Skip to content

Commit 1a29ad5

Browse files
fix: allow client-side stockfish eval for tournament game variations
1 parent fc64c78 commit 1a29ad5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/hooks/useClientAnalysisController/useClientAnalysisController.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ export const useClientAnalysisController = (game: AnalyzedGame) => {
7474

7575
useEffect(() => {
7676
if (!controller.currentNode) return
77-
if (game.type === 'tournament') return
78-
7977
const board = new Chess(controller.currentNode.fen)
80-
if (controller.currentNode.analysis.stockfish?.depth == 18) return
78+
if (
79+
controller.currentNode.analysis.stockfish &&
80+
controller.currentNode.analysis.stockfish?.depth >= 18
81+
)
82+
return
8183

8284
const evaluationStream = streamEvaluations(
8385
board.fen(),

0 commit comments

Comments
 (0)