resourceloader: Remove unused code in private mw.loader#enqueue()
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 24 Aug 2018 02:26:44 +0000 (03:26 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sun, 26 Aug 2018 04:23:46 +0000 (05:23 +0100)
The support for 'string' type of the 'dependencies' parameter is
unused. It is a private method and only called with an array
of strings.

Change-Id: I6252ec583242df46ad4c1913519cce4ef61759d7

resources/src/startup/mediawiki.js

index 06eb80e..8ad2588 100644 (file)
                         * See also #work().
                         *
                         * @private
-                        * @param {string|string[]} dependencies Module name or array of string module names
+                        * @param {string[]} dependencies Array of module names in the registry
                         * @param {Function} [ready] Callback to execute when all dependencies are ready
                         * @param {Function} [error] Callback to execute when any dependency fails
                         */
                        function enqueue( dependencies, ready, error ) {
-                               // Allow calling by single module name
-                               if ( typeof dependencies === 'string' ) {
-                                       dependencies = [ dependencies ];
-                               }
-
                                if ( allReady( dependencies ) ) {
                                        // Run ready immediately
                                        if ( ready !== undefined ) {