brototype
brototype copied to clipboard
Bro(app)... Have ReferenceError thrown: 'app' is not defined
I tried:
Bro(app).doYouEven('xxx.yyy')
That produced:
Uncaught ReferenceError: app is not defined
you'll need to show more of your code than that...Where do you define the app variable?
I had the impression that Bro(app).doYouEven('...'); will also check that app is defined. Or is my assumption wrong here?
As it currently functions, You wrap an object that you know exists. Then you check for properties of that object. Do you think that people would benefit from a null check in the wrap part of the equation? Is this a feature you'd like to see?
On Fri, Jul 8, 2016, 11:21 AM Kiong [email protected] wrote:
I had the impression that Bro(app).doYouEven('...'); will also check that app is defined. Or is my assumption wrong here?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/letsgetrandy/brototype/issues/55#issuecomment-231388686, or mute the thread https://github.com/notifications/unsubscribe/AAjwG8k5XKbWSCHfM5JG_0uhTGJIciKpks5qTmr9gaJpZM4JH-Hl .
I see. I think that would actually be a great feature:
Bro(app).doYouEven('xxx.yyy');
Should perhaps check if the following are not undefined & null till the last property:
app
xxx
yyy
@letsgetrandy I can put together a pull request if you approve it. This discussion could use your opinion.