Fixing typeof with null argument.
This commit is contained in:
1 parent
a9856dcf9a
commit
7dcbeec487
2 files changed
+2
-2
No files matched your search
@@ -1448,7 +1448,7 @@ opfunc_typeof (opcode_t opdata, /**< operation data */
|
||||
}
|
||||
case ECMA_SIMPLE_VALUE_NULL:
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_NULL);
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_OBJECT);
|
||||
break;
|
||||
}
|
||||
case ECMA_SIMPLE_VALUE_FALSE:
|
||||
|
||||
@@ -18,7 +18,7 @@ function f()
|
||||
}
|
||||
|
||||
assert(typeof(a) === "undefined");
|
||||
assert(typeof(null) === "null");
|
||||
assert(typeof(null) === "object");
|
||||
assert(typeof(false) === "false");
|
||||
assert(typeof(true) === "true");
|
||||
assert(typeof(1) === "number");
|
||||
|
||||
Reference in new issue
Block a user