Merge "Add check for editing restriction widget on Special:Block"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 3 Jan 2019 17:54:05 +0000 (17:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 3 Jan 2019 17:54:05 +0000 (17:54 +0000)
resources/src/mediawiki.special.block.js

index 255b878..89bbbc8 100644 (file)
@@ -67,7 +67,9 @@
                        // Bind functions so they're checked whenever stuff changes
                        blockTargetWidget.on( 'change', updateBlockOptions );
                        expiryWidget.on( 'change', updateBlockOptions );
-                       editingRestrictionWidget.on( 'change', updateBlockOptions );
+                       if ( editingRestrictionWidget ) {
+                               editingRestrictionWidget.on( 'change', updateBlockOptions );
+                       }
 
                        // Call them now to set initial state (ie. Special:Block/Foobar?wpBlockExpiry=2+hours)
                        updateBlockOptions();