Browse Source

Merge pull request #756 from herby/ie8-fix

Ie8 fix
Nicolas Petton 11 years ago
parent
commit
cae51cb218
2 changed files with 4 additions and 2 deletions
  1. 2 0
      support/boot.js
  2. 2 2
      support/helpers.js

+ 2 - 0
support/boot.js

@@ -57,6 +57,7 @@ function Brikz(api, apiKey, initKey) {
 
 	var d={value: null, enumerable: false, configurable: true, writable: true};
 	Object.defineProperties(this, { ensure: d, rebuild: d });
+	var exclude = mixin(this, {});
 
 	this.rebuild = function () {
 		Object.keys(backup).forEach(function (key) {
@@ -64,6 +65,7 @@ function Brikz(api, apiKey, initKey) {
 		});
 		var oapi = mixin(api, {}), order = [], chk = {};
 		brikz.ensure = function(key) {
+			if (key in exclude) { return null; }
 			var b = brikz[key], bak = backup[key];
 			mixin({}, api, api);
 			while (typeof b === "function") { b = new b(brikz, api, bak); }

+ 2 - 2
support/helpers.js

@@ -5,8 +5,8 @@ define("amber/helpers", ["amber_vm/smalltalk", "require"], function (smalltalk,
         }
     };
     Object.defineProperty(exports, "smalltalk", {
-        get: function () { return smalltalk; },
-        enumerable: true, configurable: true
+        value: smalltalk,
+        enumerable: true, configurable: true, writable: false
     });
     return  exports;
 });