Skip to content
Permalink
Browse files

Fixes #13566. If there is a window object, and it has a document prop…

…erty, 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>
  • Loading branch information...
rwaldron committed Apr 4, 2013
1 parent 37c801e commit 6358da8aa32e7ed52da3af1a912bdd1a05863faf
Showing with 3 additions and 2 deletions.
  1. +3 −2 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;
}

0 comments on commit 6358da8

Please sign in to comment.
You can’t perform that action at this time.