1
0
ソースを参照

devkit: Use #addGlobalJsVariable API.

Herbert Vojčík 7 年 前
コミット
72993e6e8c
1 ファイル変更3 行追加4 行削除
  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;
         });