diff --git a/src/libcoreint/opcodes.c b/src/libcoreint/opcodes.c index adc157c40..b75e911f0 100644 --- a/src/libcoreint/opcodes.c +++ b/src/libcoreint/opcodes.c @@ -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: diff --git a/tests/jerry/typeof.js b/tests/jerry/typeof.js index 53f82a288..57ae2f7a6 100644 --- a/tests/jerry/typeof.js +++ b/tests/jerry/typeof.js @@ -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");