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

[BUGFIX beta] Guard jQuery access in `setupForTesting`. #15065

Merged
merged 1 commit into from Mar 24, 2017
Merged

Conversation

@rwjblue
Copy link
Member

rwjblue commented Mar 24, 2017

Begins addressing #15063.

@@ -35,11 +35,13 @@ export default function setupForTesting() {
setAdapter((typeof self.QUnit === 'undefined') ? new Adapter() : new QUnitAdapter());
}

jQuery(document).off('ajaxSend', incrementPendingRequests);
jQuery(document).off('ajaxComplete', decrementPendingRequests);
if (jQuery) {

This comment has been minimized.

Copy link
@cibernox

cibernox Mar 24, 2017

Contributor

can you do import { jQuery } from 'ember-views'; if there is no jquery? What does that import?

This comment has been minimized.

Copy link
@rwjblue

rwjblue Mar 24, 2017

Author Member

@cibernox - Yes, it exports undefined in that case you can see (from here) that it basically does:

let jQuery

export default jQuery
@rwjblue rwjblue merged commit 5506aba into master Mar 24, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rwjblue rwjblue deleted the guard-jquery-access branch Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.