Skip to content

Commit e973359

Browse files
committed
fix(plugins/community/chess): NaN when PAT [skip ci]
1 parent 1b1478e commit e973359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/plugins/community/chess/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
3636
board.loadPgn(PGN)
3737
const moves = board.history({verbose: true})
3838
const meta = board.header()
39-
const result = Object.fromEntries(meta.Result.split("-").map((score, i) => [i ? "black" : "white", Number(score)]))
39+
const result = Object.fromEntries(meta.Result.split("-").map((score, i) => [i ? "black" : "white", Number(score) || 0]))
4040

4141
//Results
4242
return {platform, meta, moves, animation, result}

0 commit comments

Comments
 (0)