From 33662ec25111da92b6b95f1007cfa6ec06c5752f 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 8d4545e..4763993 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 });