Skip to content

Commit 47b1ed9

Browse files
committed
serialize for node
1 parent 73e0866 commit 47b1ed9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/nodes/logic/ForNode.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ export class ForNode extends ExecutableLogicNode {
4747

4848
return '';
4949
}
50+
51+
override serialize(): Record<string, any> {
52+
return {
53+
count: this.count.value,
54+
...super.serialize()
55+
}
56+
}
57+
58+
override unserialize(data: Record<string, any>): void {
59+
super.unserialize(data)
60+
this.count.value = data.count ?? 0;
61+
62+
}
5063

5164
}
5265

0 commit comments

Comments
 (0)