From: Timo Tijhof Date: Thu, 25 Jul 2019 16:37:46 +0000 (+0100) Subject: resourceloader: Also clear store in debug mode to simplify mw.loader.store.init() X-Git-Tag: 1.34.0-rc.0~860^2~1 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22calendrier%22%2C%22type=semaine%22%29%20.%20%22?a=commitdiff_plain;h=e07ac8f31466fd7e9dff4cbc9cccb31b96c942e8;p=lhc%2Fweb%2Fwiklou.git resourceloader: Also clear store in debug mode to simplify mw.loader.store.init() This makes it consistent with the other two circumstances in which mw.loader.store is disabled. Also, it makes debug=true a more easily accessible means for users to clear module storage, which can be useful at times (without requiring console access). Change-Id: I9c66815a2f6c60feef3e070cfe57c382a69cc752 --- diff --git a/resources/src/startup/mediawiki.js b/resources/src/startup/mediawiki.js index dbb32e5452..2081bfe657 100644 --- a/resources/src/startup/mediawiki.js +++ b/resources/src/startup/mediawiki.js @@ -2186,18 +2186,16 @@ /Firefox/.test( navigator.userAgent ) || // Disabled by configuration. - !mw.config.get( 'wgResourceLoaderStorageEnabled' ) + !mw.config.get( 'wgResourceLoaderStorageEnabled' ) || + + // Disable module store in debug mode context + mw.config.get( 'debug' ) ) { // Clear any previous store to free up space. (T66721) this.clear(); this.enabled = false; return; } - if ( mw.config.get( 'debug' ) ) { - // Disable module store in debug mode - this.enabled = false; - return; - } try { // This a string we stored, or `null` if the key does not (yet) exist.