Skip to content

Commit d18c065

Browse files
committed
[js] Fix serialization of VMArrays where all the elements haven't been assigned to.
1 parent 2a4e696 commit d18c065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vm/js/nqp-runtime/reprs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ class VMArray extends REPR {
918918

919919
cursor.varint(obj.array.length);
920920
for (var i = 0; i < obj.array.length; i++) {
921-
cursor.ref(obj.array[i]);
921+
cursor.ref(obj.array[i] === undefined ? Null : obj.array[i]);
922922
}
923923
}
924924

0 commit comments

Comments
 (0)