Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

ngJq causes warning in Firefox #12741

Closed
arhoads opened this issue Sep 2, 2015 · 0 comments
Closed

ngJq causes warning in Firefox #12741

arhoads opened this issue Sep 2, 2015 · 0 comments

Comments

@arhoads
Copy link

arhoads commented Sep 2, 2015

If ngJq is used without a value passed to it Firefox warns "Empty string passed to getElementById()."
Tested in Firefox 40.0.3.

http://jsbin.com/kimatejiqa/1/edit?html,js,output

gkalpak added a commit to gkalpak/angular.js that referenced this issue Sep 3, 2015
Previously, even when `ng-jq` was empty (which should force the use of
jqLite), Angular tried to find jQuery on `window['']`. If it didn't find
anything there, it would fall back to jqLite (as expected).

Nonetheless, trying to access `window['']` calls `getElementById('')`,
which issues a warning in Firefox (maybe others).

This fix properly detects when `ng-jq` is empty and avoids trying to
access `window['']`.

Fixes angular#12741
gkalpak added a commit to gkalpak/angular.js that referenced this issue Sep 3, 2015
Previously, even when `ng-jq` was empty (which should force the use of
jqLite), Angular tried to find jQuery on `window['']`. If it didn't find
anything there, it would fall back to jqLite (as expected).

Nonetheless, trying to access `window['']` calls `getElementById('')`,
which issues a warning in Firefox (maybe others).

This fix properly detects when `ng-jq` is empty and avoids trying to
access `window['']`.

Fixes angular#12741
gkalpak added a commit to gkalpak/angular.js that referenced this issue Sep 3, 2015
Previously, even when `ng-jq` was empty (which should force the use of
jqLite), Angular tried to find jQuery on `window['']`. If it didn't find
anything there, it would fall back to jqLite (as expected).

Nonetheless, trying to access `window['']` calls `getElementById('')`,
which issues a warning in Firefox (maybe others).

This fix properly detects when `ng-jq` is empty and avoids trying to
access `window['']`.

Fixes angular#12741
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant