Merge "OutputPage: Tiny tweak to jQuery.ready inline script"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 1 Apr 2015 17:18:23 +0000 (17:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 1 Apr 2015 17:18:23 +0000 (17:18 +0000)
includes/OutputPage.php

index edeae0d..1a4f5b7 100644 (file)
@@ -3106,7 +3106,7 @@ class OutputPage extends ContextSource {
                // This also enforces $.isReady to be true at </body> which fixes the
                // mw.loader bug in Firefox with using document.write between </body>
                // and the DOMContentReady event (bug 47457).
-               $html = Html::inlineScript( 'window.jQuery && jQuery.ready();' );
+               $html = Html::inlineScript( 'if(window.jQuery)jQuery.ready();' );
 
                if ( !$this->getConfig()->get( 'ResourceLoaderExperimentalAsyncLoading' ) ) {
                        $html .= $this->getScriptsForBottomQueue( false );