소스 검색

[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 6 년 전
부모
커밋
5f18a08f57
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 		}
 	}