From e973359bb44b5dab6aa7a63a7d4e8774fffcd68b Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Thu, 8 Sep 2022 12:57:02 -0400 Subject: [PATCH] fix(plugins/community/chess): `NaN` when PAT [skip ci] --- source/plugins/community/chess/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/community/chess/index.mjs b/source/plugins/community/chess/index.mjs index 823ccedf..8e001182 100644 --- a/source/plugins/community/chess/index.mjs +++ b/source/plugins/community/chess/index.mjs @@ -36,7 +36,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal board.loadPgn(PGN) const moves = board.history({verbose: true}) const meta = board.header() - const result = Object.fromEntries(meta.Result.split("-").map((score, i) => [i ? "black" : "white", Number(score)])) + const result = Object.fromEntries(meta.Result.split("-").map((score, i) => [i ? "black" : "white", Number(score) || 0])) //Results return {platform, meta, moves, animation, result}