Skip to content

Handle users not returning an object from the props function #25

@micahr

Description

@micahr

Trying to set a property in a props function, when a dependency didn't return an object causes this error which is hard to find the root cause. There should be a handler around calling the props function, which determines if this._props is undefined or not, and throws an error so users can correct the issue.

TypeError: Cannot set property 'property' of undefined
    at Object.module.exports.rc.createConductor.props [as propsFn] 
    at Conductor._mergeDeps (/restify-conductor/lib/Conductor.js:256:35)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions