diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/OrdinaryFunctionObject.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/OrdinaryFunctionObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/OrdinaryFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/OrdinaryFunctionObject.cpp index 5e900f6125..1f0d1cdcd4 100644 --- a/Userland/Libraries/LibJS/Runtime/OrdinaryFunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/OrdinaryFunctionObject.cpp @@ -166,7 +166,7 @@ Value OrdinaryFunctionObject::execute_function_body() [&](const auto& param) { Value argument_value; if (parameter.is_rest) { - auto* array = Array::create(global_object()); + auto* array = Array::create(global_object(), 0); for (size_t rest_index = i; rest_index < execution_context_arguments.size(); ++rest_index) array->indexed_properties().append(execution_context_arguments[rest_index]); argument_value = move(array); |