From 8bc2f8522622324dfe3f9324de21a5cc16ae80e0 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 24 Aug 2018 03:26:44 +0100 Subject: [PATCH] resourceloader: Remove unused code in private mw.loader#enqueue() 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 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/src/startup/mediawiki.js b/resources/src/startup/mediawiki.js index 06eb80e046..8ad2588d93 100644 --- a/resources/src/startup/mediawiki.js +++ b/resources/src/startup/mediawiki.js @@ -1083,16 +1083,11 @@ * 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 ) { -- 2.20.1