From 158f4cd6cceaf06b6cbd5845337840f24fdd0f7f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sat, 29 Aug 2015 01:12:07 +0200 Subject: [PATCH] resourceloader: Remove redundant type-checks in internal code The private 'execute()' method only runs for modules that have been implemented by mw.loader.implement, which already throws if 'messages' or 'style' is set to a non-object value. The execute() code for 'templates' already has this check removed. Change-Id: I65b8a87500388d3d2ca6e495e1e50179639ba27a --- resources/src/mediawiki/mediawiki.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index 2632902a25..2621a97dba 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -1245,7 +1245,7 @@ registry[module].state = 'loading'; // Add localizations to message system - if ( $.isPlainObject( registry[module].messages ) ) { + if ( registry[module].messages ) { mw.messages.set( registry[module].messages ); } @@ -1283,7 +1283,7 @@ // * back-compat: { : [url, ..] } // * { "css": [css, ..] } // * { "url": { : [url, ..] } } - if ( $.isPlainObject( registry[module].style ) ) { + if ( registry[module].style ) { for ( key in registry[module].style ) { value = registry[module].style[key]; media = undefined; -- 2.20.1