فهرست منبع

[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
 		}
 	}