Fixed Array.prototype.concat error type (#4117)

JerryScript-DCO-1.0-Signed-off-by: bence gabor kis [email protected]
This commit is contained in:
kisbg authored and GitHub committed 2020-08-07 14:34:57 +02:00
1 parent f4f9cde3e7
commit 58a649ffe8
3 files changed
+3 -4

No files matched your search

@@ -359,7 +359,7 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
/* 4 . */
if (*length_p + arg_len > ECMA_NUMBER_MAX_SAFE_INTEGER)
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid array length."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid array length."));
}
#else /* !ENABLED (JERRY_ESNEXT) */
/* 5.b.ii */