From 81fd5b5c9b8594624f2ada773c5e1da0a8f32e75 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sun, 30 Apr 2023 20:04:57 -0500 Subject: [PATCH] Let's try mozilla's fixedCharAt function --- commands/drawDesign.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/drawDesign.cjs b/commands/drawDesign.cjs index f9244a2..c69d1a3 100644 --- a/commands/drawDesign.cjs +++ b/commands/drawDesign.cjs @@ -218,8 +218,8 @@ function charIterate(input) { for (let i = 0; i < stringLength; ++i) { let compareString = temp.join(""); console.log(surrogatePairs.exec(compareString), compareString); - let eval = surrogatePairs.exec(compareString).index; - if (eval != null && eval == i) { + let stringEvalIndex = surrogatePairs.exec(compareString).index; + if (stringEvalIndex != null && stringEvalIndex == i) { stringLength--; console.log("Decreasing stringLength variable to", stringLength); }