1
0
Prechádzať zdrojové kódy

Respect boot.api.initialize returning a promise.

Herbert Vojčík 8 rokov pred
rodič
commit
02ef64e3a9
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      external/amber-dev/lib/amberc.js

+ 3 - 1
external/amber-dev/lib/amberc.js

@@ -204,9 +204,11 @@ function create_compiler(configuration) {
     var include_files = configuration.load;
     return new Promise(configuration.requirejs.bind(null, ["amber/lang"]))
         .then(function (boot) {
-            boot.api.initialize();
             configuration.core = boot.api;
             configuration.globals = boot.globals;
+            return boot.api.initialize();
+        })
+        .then(function () {
             var pluginPrefixedLibraries = include_files.map(function (each) {
                 return 'amber/without-imports!' + each;
             });