Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
micahr opened this issue Nov 23, 2015 · 1 comment
Open

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

micahr opened this issue Nov 23, 2015 · 1 comment

Comments

@micahr
Copy link
Member

micahr commented Nov 23, 2015

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)
@micahr
Copy link
Member Author

micahr commented Nov 23, 2015

The most important part of this would be to include the parent conductor, to speed up finding the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant