Sfoglia il codice sorgente

kernel: st.initialize to _always_ return a promise

Herbert Vojčík 7 anni fa
parent
commit
168159a9bc
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      support/boot.js

+ 4 - 4
support/boot.js

@@ -559,11 +559,11 @@ define(['require', './brikz.umd', './compatibility'], function (require, Brikz)
         /* Smalltalk initialization. Called on page load */
 
         st.initialize = function () {
-            if (initialized) {
-                return;
-            }
-
             return runtimeLoadedPromise.then(function (configureWithRuntime) {
+                if (initialized) {
+                    return;
+                }
+
                 configureWithRuntime(brikz);
 
                 /* Alias definitions */