Skip to content

Commit d2332a9

Browse files
fix: moves container colours in analysis page
1 parent 584eed1 commit d2332a9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lib/common.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ export function buildGameTreeFromMoveList(moves: any[], initialFen: string) {
99

1010
if (move.lastMove) {
1111
const [from, to, promotion] = move.lastMove
12+
const uci = from && to ? `${from}${to}${promotion ?? ''}` : ''
13+
1214
currentNode = tree
1315
.getLastMainlineNode()
14-
.addChild(move.board, from + to + promotion || '', move.san || '', true)
16+
.addChild(move.board, uci, move.san || '', true)
1517
}
1618
}
1719

0 commit comments

Comments
 (0)