Browse Source

Fix.

h.hasOwnProperty doesn't exist since h doesn't have a prototype.
Bruno Garcia 13 years ago
parent
commit
997038faa2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/js/_std/IntHash.hx

+ 2 - 2
std/js/_std/IntHash.hx

@@ -40,11 +40,11 @@
 	}
 	}
 
 
 	public function exists( key : Int ) : Bool {
 	public function exists( key : Int ) : Bool {
-		return untyped h.hasOwnProperty(key);
+		return untyped Object.prototype.hasOwnProperty.call(key);
 	}
 	}
 
 
 	public function remove( key : Int ) : Bool {
 	public function remove( key : Int ) : Bool {
-		if( untyped !h.hasOwnProperty(key) ) return false;
+		if( untyped !Object.prototype.hasOwnProperty.call(h,key) ) return false;
 		untyped  __js__("delete")(h[key]);
 		untyped  __js__("delete")(h[key]);
 		return true;
 		return true;
 	}
 	}