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

Commit

Permalink
refactor(jQlite): Calling window before document
Browse files Browse the repository at this point in the history
calling `window` before using `document` as instructed.
  • Loading branch information
Rafael Fragoso committed Oct 10, 2017
1 parent 576d348 commit ff4f3a1
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 ff4f3a1

Please sign in to comment.