Explorar o código

[js] fix js.Boot.__instanceof when $hxEnums is not present

the logic, like in other places is that if something has __enum__ then it is an enum, so has_enum feature is on, so $hxEnums gets generated
Dan Korostelev %!s(int64=6) %!d(string=hai) anos
pai
achega
5f18a08f57
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      std/js/Boot.hx

+ 1 - 1
std/js/Boot.hx

@@ -210,7 +210,7 @@ class Boot {
 			#if js_enums_as_arrays
 			return o.__enum__ == cl;
 			#else
-			return (untyped $hxEnums[o.__enum__]) == cl;
+			return if (o.__enum__ != null) (untyped $hxEnums[o.__enum__]) == cl else false;
 			#end
 		}
 	}