Browse Source

kernel: st.initialize to _always_ return a promise

Herbert Vojčík 7 years ago
parent
commit
168159a9bc
1 changed files with 4 additions and 4 deletions
  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 */