2
0
Эх сурвалжийг харах

[Js] added some missing != null

Simon Krajewski 12 жил өмнө
parent
commit
8aa79adf34

+ 2 - 2
std/flash8/_std/Reflect.hx

@@ -90,11 +90,11 @@
 
 	public static function isObject( v : Dynamic ) : Bool untyped {
 		var t = __typeof__(v);
-		return (t == "string" || (t == "object" && !v.__enum__) || (t == "function" && v.__name__ != null));
+		return (t == "string" || (t == "object" && v.__enum__ == null) || (t == "function" && v.__name__ != null));
 	}
 	
 	public static function isEnumValue( v : Dynamic ) : Bool {
-		return v.__enum__;
+		return v.__enum__ != null;
 	}
 
 	public static function deleteField( o : Dynamic, field : String ) : Bool untyped {

+ 2 - 2
std/js/_std/Reflect.hx

@@ -83,11 +83,11 @@
 		if( v == null )
 			return false;
 		var t = __js__("typeof(v)");
-		return (t == "string" || (t == "object" && !v.__enum__) || (t == "function" && (js.Boot.isClass(v) || js.Boot.isEnum(v))));
+		return (t == "string" || (t == "object" && v.__enum__ == null)) || (t == "function" && (js.Boot.isClass(v) || js.Boot.isEnum(v)) != null);
 	}
 	
 	public static function isEnumValue( v : Dynamic ) : Bool {
-		return v != null && v.__enum__;
+		return v != null && v.__enum__ != null;
 	}
 
 	public static function deleteField( o : Dynamic, field : String ) : Bool untyped {