From: Forbes Lindesay Date: Wed, 8 Jan 2014 13:44:10 +0000 (+0000) Subject: Intro: Pass window to intro if available, for browserify X-Git-Tag: 2.1.0-rc1~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6de1d973a436282af7dfe3072924016c3cdc1984;p=jquery.git Intro: Pass window to intro if available, for browserify Closes gh-1476 --- diff --git a/src/intro.js b/src/intro.js index 9e26008e2..f7dd78d3f 100644 --- a/src/intro.js +++ b/src/intro.js @@ -34,8 +34,8 @@ factory( global ); } -// Pass this, window may not be defined yet -}(this, function( window, noGlobal ) { +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Can't do this because several apps including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if