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

fixed instanceof (strict eq).

Nicolas Cannasse 19 жил өмнө
parent
commit
63370aa2a4
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      std/js/Boot.hx

+ 2 - 2
std/js/Boot.hx

@@ -140,11 +140,11 @@ class Boot {
 			}
 			switch( cl ) {
 			case Int:
-				return (Math.ceil(o) == o) && isFinite(o);
+				return (Math.ceil(o) === o) && isFinite(o);
 			case Float:
 				return __js__("typeof(o)") == "number";
 			case Bool:
-				return (o == true || o == false);
+				return (o === true || o === false);
 			case String:
 				return __js__("typeof(o)") == "string";
 			default: