Fixing typeof with null argument.

This commit is contained in:
Ruben Ayrapetyan 2014-10-15 14:19:23 +04:00
parent a9856dcf9a
commit 7dcbeec487
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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");