Merge "Use $.noop instead of function () {}"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 23 Jun 2017 11:42:26 +0000 (11:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 23 Jun 2017 11:42:26 +0000 (11:42 +0000)
resources/src/mediawiki.special/mediawiki.special.apisandbox.js

index 73c3c45..694f86a 100644 (file)
                                                if ( $.isFunction( f.focus ) ) {
                                                        f.focus();
                                                }
-                                       },
-                                       doNothing = function () {};
+                                       };
 
                                // This is something of a hack. We always want the 'format' and
                                // 'action' parameters from the main module to be specified,
                                                // it makes it too hard to read and our "disabled"
                                                // isn't really disabled.
                                                widgetField.onFieldDisable( false );
-                                               widgetField.onFieldDisable = doNothing;
+                                               widgetField.onFieldDisable = $.noop;
 
                                                if ( Util.apiBool( pi.parameters[ i ].deprecated ) ) {
                                                        deprecatedItems.push( widgetField, helpField );