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