浏览代码

fixed instanceof (strict eq).

Nicolas Cannasse 19 年之前
父节点
当前提交
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: