Always serialize parent and next on a block even if they're null.

This commit is contained in:
kchadha 2018-03-09 16:03:28 -05:00
parent 4f6ece9fa8
commit 09c8110923

View file

@ -29,12 +29,8 @@ const serializeBlock = function (block) {
const obj = Object.create(null);
obj.id = block.id;
obj.opcode = block.opcode;
if (block.next) {
obj.next = block.next;
}
if (block.parent) {
obj.parent = block.parent;
}
obj.next = block.next;
obj.parent = block.parent;
obj.inputs = block.inputs;
obj.fields = block.fields;
obj.topLevel = block.topLevel;