Skip to content

Check for opt.$menu != null instead of opt.$menu !== null.#511

Merged
bbrala merged 1 commit intomasterfrom
unknown repository
Mar 15, 2017
Merged

Check for opt.$menu != null instead of opt.$menu !== null.#511
bbrala merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Mar 13, 2017

This prevents calling trigger() on an undefined object. Based on my testing opt.$menu != null should be used to check for undefined, since this fixes the actual error based on my testing.

This is related to my previous pull request here:
#462

…nts calling trigger() on an undefined object.
@bbrala
Copy link
Member

bbrala commented Mar 15, 2017

Thanks for the PR!

When i changed this i wondered if that might break something, thanks for the report. I would prefer to check for null and undefined then though with ===

@ghost
Copy link
Author

ghost commented Mar 15, 2017

Sure, perhaps you can do that change? I'm mostly just interested in any solution which fixes this problem for the users.

@bbrala
Copy link
Member

bbrala commented Mar 15, 2017

Yeah, will do, btw, love your work :) Saw a post on civfanatics a bit back about your application. Love civ ^^

@bbrala bbrala mentioned this pull request Mar 15, 2017
@bbrala bbrala merged commit 3e2f039 into swisnl:master Mar 15, 2017
@bbrala
Copy link
Member

bbrala commented Mar 15, 2017

Updated and merged. :) Thanks again.

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

Successfully merging this pull request may close these issues.

2 participants