From 0da9d9d3c0d10895227dfe7a9a0a4dad79306c1d Mon Sep 17 00:00:00 2001 From: Collin Pearce Date: Tue, 2 Jan 2024 06:26:34 -0800 Subject: [PATCH] fix player input parsing for coding contracts that accept arrays of strings (#937) --- src/data/codingcontracttypes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/codingcontracttypes.ts b/src/data/codingcontracttypes.ts index 36223e3e6..5d5ae8f6b 100644 --- a/src/data/codingcontracttypes.ts +++ b/src/data/codingcontracttypes.ts @@ -1162,7 +1162,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans); const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(","); for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) { - sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\s/g, ""); + sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i].replace(/\s/g, "")); } if (sanitizedPlayerAnsArr.length !== res.length) { @@ -1264,7 +1264,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ // Don't include any "" entries in the parsed array const sanitizedPlayerAnsArr: string[] = filterTruthy(sanitizedPlayerAns.split(",")); for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) { - sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\s/g, ""); + sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i].replace(/\s/g, "")); } if (num == null || num.length === 0) {