Fix result of Date getters when called on invalid date (#3879)

Fixes #3878.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
This commit is contained in:
Dániel Bátyai authored and GitHub committed 2020-06-09 07:27:31 +02:00
1 parent 585332f072
commit 70383255fc
2 files changed
+22 -1

No files matched your search

@@ -237,7 +237,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
{
if (ecma_number_is_nan (date_num))
{
return ecma_make_magic_string_value (LIT_MAGIC_STRING_NAN);
return ecma_make_nan_value ();
}
switch (builtin_routine_id)