Parcourir la source

devkit: Use #addGlobalJsVariable API.

Herbert Vojčík il y a 7 ans
Parent
commit
72993e6e8c
1 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. 3 4
      external/amber-dev/lib/amberc.js

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

@@ -217,10 +217,9 @@ function create_compiler(configuration) {
         .then(function () {
             console.log('Compiler loaded');
 
-            if (0 !== configuration.jsGlobals.length) {
-                var jsGlobalVariables = configuration.core.globalJsVariables;
-                jsGlobalVariables.push.apply(jsGlobalVariables, configuration.jsGlobals);
-            }
+            configuration.jsGlobals.forEach(function (each) {
+                configuration.globals.Smalltalk._addGlobalJsVariable_(each);
+            });
 
             return configuration;
         });