Browse Source

Fix to explicitly have value: in any Object.defineProp... call. Now it should work with kriskowal/es5-shim.

Herbert Vojčík 12 years ago
parent
commit
041329efee
1 changed files with 3 additions and 6 deletions
  1. 3 6
      js/boot.js

+ 3 - 6
js/boot.js

@@ -146,13 +146,10 @@ function Smalltalk(){
 		});
 		that.pkg = spec.pkg;
 		Object.defineProperties(that.fn.prototype, {
-			methods: { enumerable: false, configurable: true, writable: true },
-			inheritedMethods: { enumerable: false, configurable: true, writable: true },
-			klass: { enumerable: false, configurable: true, writable: true }
+			methods: { value: {}, enumerable: false, configurable: true, writable: true },
+			inheritedMethods: { value: {}, enumerable: false, configurable: true, writable: true },
+			klass: { value: that, enumerable: false, configurable: true, writable: true }
 		});
-		that.fn.prototype.methods = {};
-		that.fn.prototype.inheritedMethods = {};
-		that.fn.prototype.klass = that;
 		return that;
 	};