Skip to content

Commit

Permalink
fix issue when there is only one pv
Browse files Browse the repository at this point in the history
  • Loading branch information
ksthicke committed May 22, 2024
1 parent e20dc0d commit ac0116e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/renderer/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,13 @@ export const store = new Vuex.Store({
board.setFen(context.state.fen)
console.warn('Invalid engine pv move.\nFEN:', board.fen(), '\nPV:', payload.pv)
}
multipv[payload.multipv - 1] = pvline

// if there is only one pv
if (payload.multipv === undefined) {
multipv[0] = pvline
} else {
multipv[payload.multipv - 1] = pvline
}
}
}
context.commit('multipv', multipv)
Expand Down

0 comments on commit ac0116e

Please sign in to comment.