2
0
Nicolas Cannasse 19 жил өмнө
parent
commit
a8742b0c35

+ 8 - 0
std/haxe/Serializer.hx

@@ -105,8 +105,16 @@ class Serializer {
 	}
 
 	function serializeRef(v) {
+		#if js
+		var vt = untyped __js__("typeof")(v);
+		#end
 		for( i in 0...cache.length ) {
+			#if js
+			var ci = cache[i];
+			if( untyped __js__("typeof")(ci) == vt && ci == v ) {
+			#else true
 			if( cache[i] == v ) {
+			#end
 				buf.add("r");
 				buf.add(i);
 				return true;