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

Commit

Permalink
refactor(jQuery): call window before using document
Browse files Browse the repository at this point in the history
use the window to call document as instructed
  • Loading branch information
Rafael Fragoso committed Oct 11, 2017
1 parent 930ee2d commit ecb0569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jqLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function JQLite(element) {
}
if (!(this instanceof JQLite)) {
if (argIsString && element.charAt(0) !== '<') {
return new JQLite(document.querySelector(element));
return new JQLite(window.document.querySelector(element));
}
return new JQLite(element);
}
Expand Down

0 comments on commit ecb0569

Please sign in to comment.