From 146866633f4c9544715615452c328dd7074e50c1 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 7 Sep 2022 22:50:11 -0500 Subject: [PATCH] Fix boards not starting with starting nodes --- src/features/boards/board.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/features/boards/board.ts b/src/features/boards/board.ts index 322037b..5c815b3 100644 --- a/src/features/boards/board.ts +++ b/src/features/boards/board.ts @@ -211,7 +211,10 @@ export function createBoard( board[Component] = BoardComponent; board.state = persistent({ - nodes: [], + nodes: board.startNodes().map((n, i) => { + (n as BoardNode).id = i; + return n as BoardNode; + }), selectedNode: null, selectedAction: null });