1
0
Quellcode durchsuchen

Sets amdRequire in boot.js. Fixes #808.

Herbert Vojčík vor 11 Jahren
Ursprung
Commit
d92f55b29b
2 geänderte Dateien mit 4 neuen und 10 gelöschten Zeilen
  1. 2 2
      support/boot.js
  2. 2 8
      support/smalltalk.js

+ 2 - 2
support/boot.js

@@ -38,7 +38,7 @@
  ==================================================================== */
 
 
-define("amber_vm/boot", [ './browser-compatibility' ], function () {
+define("amber_vm/boot", [ 'require', './browser-compatibility' ], function (require) {
 
 	/* Reconfigurable micro composition system, https://github.com/amber-smalltalk/brikz */
 
@@ -1096,7 +1096,7 @@ define("amber_vm/boot", [ './browser-compatibility' ], function () {
 	/* Adds AMD and requirejs related methods to the smalltalk object */
 	function AMDBrik(brikz, st) {
 		this.__init__ = function () {
-			st.amdRequire = st.amdRequire || null;
+			st.amdRequire = require;
 			st.defaultTransportType = st.defaultTransportType || "amd";
 			st.defaultAmdNamespace = st.defaultAmdNamespace || "amber_core";
 		};

+ 2 - 8
support/smalltalk.js

@@ -1,10 +1,4 @@
-define("amber_vm/smalltalk", ["require", "module", "./boot"], function (require, module, boot) {
-    var smalltalk = boot.smalltalk;
-	smalltalk.amdRequire = require;
-//    var config = module.config && module.config();
-//    if (config) {
-//		smalltalk.defaultAmdNamespace = config.defaultNamespace;
-//    }
-    return  smalltalk;
+define("amber_vm/smalltalk", ["./boot"], function (boot) {
+    return boot.smalltalk;
 });