resourceloader: In startup, move RLQ handling to after mw.config
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 4 Aug 2015 01:38:30 +0000 (18:38 -0700)
committerKrinkle <krinklemail@gmail.com>
Tue, 4 Aug 2015 01:46:50 +0000 (01:46 +0000)
Follows-up 59f1a1efa8.

This wasn't breaking anything currently because the startup module
is still loading synchronously.

Change-Id: I2c91331050378f2b5925e89b3aab50a555c07bcd

resources/src/startup.js

index 1332459..97fa134 100644 (file)
@@ -76,6 +76,10 @@ function startUp() {
 
        $CODE.registrations();
 
+       mw.config.set( $VARS.configuration );
+
+       // Must be after mw.config.set because these callbacks may use mw.loader which
+       // needs to have values 'skin', 'debug' etc. from mw.config.
        window.RLQ = window.RLQ || [];
        while ( RLQ.length ) {
                RLQ.shift()();
@@ -85,8 +89,6 @@ function startUp() {
                        fn();
                }
        };
-
-       mw.config.set( $VARS.configuration );
 }
 
 // Conditional script injection