Merge "mw.special.movePage: Don't fail if no "Move associated talk page" checkbox"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 12 Sep 2016 15:39:48 +0000 (15:39 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 12 Sep 2016 15:39:48 +0000 (15:39 +0000)
resources/src/mediawiki.special/mediawiki.special.movePage.js

index 9af81b8..bce512c 100644 (file)
@@ -1,11 +1,13 @@
 /*!
  * JavaScript for Special:MovePage
  */
-jQuery( function () {
+jQuery( function ( $ ) {
        // Infuse for pretty dropdown
        OO.ui.infuse( 'wpNewTitle' );
        // Limit to 255 bytes, not characters
        OO.ui.infuse( 'wpReason' ).$input.byteLimit();
        // Infuse for nicer "help" popup
-       OO.ui.infuse( 'wpMovetalk-field' );
+       if ( $( '#wpMovetalk-field' ).length ) {
+               OO.ui.infuse( 'wpMovetalk-field' );
+       }
 } );