File size: 649 Bytes
b77d04b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;