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

Arbitrary arguments to wait cause error #300

Closed
simonihmig opened this issue Jan 15, 2018 · 1 comment
Closed

Arbitrary arguments to wait cause error #300

simonihmig opened this issue Jan 15, 2018 · 1 comment

Comments

@simonihmig
Copy link
Contributor

Seems since this commit where wait delegates to settled, passing a non-object (e.g. boolean) to wait would cause a Cannot use 'in' operator to search for 'waitForTimers' in true error. Prior to this, this would work (the argument would simply have no effect).

Offending line:

waitForTimers = 'waitForTimers' in options ? options.waitForTimers : true;

Example: https://travis-ci.org/kybishop/ember-popper/jobs/328856339#L547
Caused by: https://github.com/kybishop/ember-popper/blob/5d4457588fd9f30f7a0a2aa34a28e86209ae5978/tests/integration/components/ember-popper/action-test.js#L46

@rwjblue
Copy link
Member

rwjblue commented Jan 15, 2018

Great sleuthing. There is another reported issue around this same sort of thing (though I didn’t know it was related until you tracked down the problem).

The fix here should be to check the arg is an object and not-null before checking for options...

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

2 participants