From 9b307959096b9ff0196e0c35fcfc465cd1d78bf7 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sun, 30 Apr 2023 19:59:30 -0500 Subject: [PATCH] Let's try mozilla's fixedCharAt function --- commands/drawDesign.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/drawDesign.cjs b/commands/drawDesign.cjs index cb9a491..6b677fe 100644 --- a/commands/drawDesign.cjs +++ b/commands/drawDesign.cjs @@ -217,7 +217,7 @@ function charIterate(input) { let temp = input.split(''); for (let i = 0; i < stringLength; ++i) { let compareString = temp.join(""); - if (surrogatePairs.exec(compareString).index == i) { + if (surrogatePairs.exec(compareString)[index] == i) { stringLength--; console.log("Decreasing stringLength variable to", stringLength); }