From 43e64cffa26bc8d2456fdcc4753db6f13df41eb6 Mon Sep 17 00:00:00 2001 From: Succubyss <87207237+Succubyss@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:37:31 -0500 Subject: [PATCH] use push instead of fixed size array --- public/scripts/slash-commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 9b16a294b..d9d27f0db 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -1888,10 +1888,10 @@ async function getMessagesCallback(args, value) { return includeNames ? `${msg.name}: ${msg.mes}` : msg.mes; }; - const messagePromises = new Array(range.end - range.start + 1); + const messagePromises = []; for (let rInd = range.start; rInd <= range.end; ++rInd) - messagePromises[rInd - range.start] = processMessage(rInd); + messagePromises.push(processMessage(rInd)); const messages = await Promise.all(messagePromises);