mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Fix boards not starting with starting nodes
This commit is contained in:
parent
919a3cd726
commit
33662ec251
1 changed files with 4 additions and 1 deletions
|
@ -211,7 +211,10 @@ export function createBoard<T extends BoardOptions>(
|
||||||
board[Component] = BoardComponent;
|
board[Component] = BoardComponent;
|
||||||
|
|
||||||
board.state = persistent<BoardData>({
|
board.state = persistent<BoardData>({
|
||||||
nodes: [],
|
nodes: board.startNodes().map((n, i) => {
|
||||||
|
(n as BoardNode).id = i;
|
||||||
|
return n as BoardNode;
|
||||||
|
}),
|
||||||
selectedNode: null,
|
selectedNode: null,
|
||||||
selectedAction: null
|
selectedAction: null
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue