Browse Source

Fix __proto__ (js)

Pascal Peridont 19 years ago
parent
commit
50766a33bf
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/Hash.hx

+ 4 - 0
std/Hash.hx

@@ -32,6 +32,10 @@ class Hash<T> {
 		h = untyped __dollar__hnew(0);
 		#else js
 		h = untyped __js__("{}");
+		untyped if( h["__proto__"] != null ){
+			h.__proto__ = null;
+			__js__("delete")(h["__proto__"]);
+		}
 		#else error
 		#end
 	}