Fixed issue where reference error can be thrown - response to comments on r84985
authorTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 1 Apr 2011 18:05:15 +0000 (18:05 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 1 Apr 2011 18:05:15 +0000 (18:05 +0000)
resources/mediawiki/mediawiki.js

index 21e854f..eded36a 100644 (file)
@@ -720,7 +720,7 @@ window.mediaWiki = new ( function( $ ) {
                        } catch ( e ) {
                                // This needs to NOT use mw.log because these errors are common in production mode
                                // and not in debug mode, such as when a symbol that should be global isn't exported
-                               if ( console && typeof console.log === 'function' ) {
+                               if ( window.console && typeof window.console.log === 'function' ) {
                                        console.log( _fn + 'Exception thrown by ' + module + ': ' + e.message );
                                        console.log( e );
                                }