aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2013-04-04 16:55:16 -0400
committerRick Waldron <waldron.rick@gmail.com>2013-04-04 16:55:16 -0400
commit37c801eda5a96ba8d58f3d8751c42df296d3bd39 (patch)
tree3c42c6840772adfc4856fe6c89485771b5a6d4b9
parent32b066d3805a48f8c8312562ed52a1b5910b1d85 (diff)
downloadjquery-37c801eda5a96ba8d58f3d8751c42df296d3bd39.tar.gz
jquery-37c801eda5a96ba8d58f3d8751c42df296d3bd39.zip
Fixes #13566. If there is a window object, define jQuery and $
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
-rw-r--r--src/exports.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/exports.js b/src/exports.js
index 365c97bf6..db554347d 100644
--- a/src/exports.js
+++ b/src/exports.js
@@ -5,9 +5,6 @@ if ( typeof module === "object" && typeof module.exports === "object" ) {
// upon in the Node module world.
module.exports = jQuery;
} else {
- // Otherwise expose jQuery to the global object as usual
- window.jQuery = window.$ = jQuery;
-
// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
@@ -19,3 +16,8 @@ if ( typeof module === "object" && typeof module.exports === "object" ) {
define( "jquery", [], function () { return jQuery; } );
}
}
+
+// If there is a window object, define a jQuery and $
+if ( typeof window === "object" ) {
+ window.jQuery = window.$ = jQuery;
+}