From 548eb6e210f4910649897262e329f33357ad03b8 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Wed, 8 Sep 2021 11:54:23 +0100 Subject: [PATCH] Fix answer processing bug Only first instance of each character was removed when cleansing strings. Now all instances are removed. --- functions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index 3380520..57071d3 100644 --- a/functions/index.js +++ b/functions/index.js @@ -354,7 +354,7 @@ function cleanseVocabString(item) { let newString = item; chars.split("").forEach((char) => { - newString = newString.replace(char, ""); + newString = newString.replaceAll(char, ""); }); return newString;