diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2013-04-04 17:27:15 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2013-04-04 17:27:15 -0400 |
commit | 6358da8aa32e7ed52da3af1a912bdd1a05863faf (patch) | |
tree | 3c2fae567ac7ec66f4d643224b0bfbd3b40e44b9 /src | |
parent | 37c801eda5a96ba8d58f3d8751c42df296d3bd39 (diff) | |
download | jquery-6358da8aa32e7ed52da3af1a912bdd1a05863faf.tar.gz jquery-6358da8aa32e7ed52da3af1a912bdd1a05863faf.zip |
Fixes #13566. If there is a window object, and it has a document property, it might be the window we want, so define jQuery and $. Thanks to @dcherman for saving us from that embarrassment!
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/exports.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exports.js b/src/exports.js index db554347d..37b797075 100644 --- a/src/exports.js +++ b/src/exports.js @@ -17,7 +17,8 @@ if ( typeof module === "object" && typeof module.exports === "object" ) { } } -// If there is a window object, define a jQuery and $ -if ( typeof window === "object" ) { +// If there is a window object, that at least has a document property, +// define jQuery and $ identifiers +if ( typeof window === "object" && typeof window.document === "object" ) { window.jQuery = window.$ = jQuery; } |