From: Rick Waldron Date: Thu, 4 Apr 2013 21:27:15 +0000 (-0400) Subject: Fixes #13566. If there is a window object, and it has a document property, it might... X-Git-Tag: 2.0.0-beta3~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6358da8aa32e7ed52da3af1a912bdd1a05863faf;p=jquery.git 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 --- 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; }