diff --git a/src/njs_vmcode.c b/src/njs_vmcode.c index ef0beb5e..b4478d26 100644 --- a/src/njs_vmcode.c +++ b/src/njs_vmcode.c @@ -1272,6 +1272,15 @@ njs_vmcode_property_init(njs_vm_t *vm, njs_value_t *value, njs_value_t *key, index = (uint32_t) num; array = value->data.u.array; + if (njs_slow_path(!array->object.fast_array)) { + ret = njs_value_property_i64_set(vm, value, index, init); + if (njs_slow_path(ret == NJS_ERROR)) { + return NJS_ERROR; + } + + break; + } + if (index >= array->length) { size = index - array->length;