Skip to content

Avoid errors with undefined populator, selector#41

Open
izak wants to merge 2 commits intomasterfrom
oerpub-ticket408
Open

Avoid errors with undefined populator, selector#41
izak wants to merge 2 commits intomasterfrom
oerpub-ticket408

Conversation

@izak
Copy link
Copy Markdown

@izak izak commented May 28, 2013

For reasons I could not determine, and which disappear whenever you add a
debugger to the mix (that is, it is a race condition), The populator and helper
members are sometimes undefined causing errors. In addition, this code makes
sure we don't get the entire hierarchy if more than one parent matches
the selector, for we most certainly don't want more than one popup.

izak added 2 commits May 28, 2013 13:42
For reasons I could not determine, and which disappear whenever you add a
debugger to the mix (that is, it is a race condition), The populator and helper
members are sometimes undefined causing errors. In addition, this code makes
sure we don't get the entire hierarchy if more than one parent matches
the selector, for we most certainly don't want more than one popup.

Fixes alohaeditor#408.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for .eq(0) instead of .first()?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing specific, I just don't have first() near the top of my mental cheatsheet :-) Isn't it the same thing anyway? first() probably reads easier though.

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