From 41611bc18c8b75a29f0cc13edc761b9be845fb30 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sun, 30 Apr 2023 19:59:00 -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 013261e..cb9a491 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(input).index == i) { + if (surrogatePairs.exec(compareString).index == i) { stringLength--; console.log("Decreasing stringLength variable to", stringLength); }