From 7e02cf7fde86454f761c67f9c33640b1aa7fd496 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 5 May 2024 11:49:57 -0400 Subject: [PATCH] Update Util.js --- util/Util.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/Util.js b/util/Util.js index b678169b..2e60b484 100644 --- a/util/Util.js +++ b/util/Util.js @@ -61,8 +61,10 @@ module.exports = class Util { } static removeFromArray(arr, value) { - const index = arr.indexOf(value); - if (index > -1) return arr.splice(index, 1); + while (arr.indexOf(value) > -1) { + const index = arr.indexOf(value); + arr = arr.splice(index, 1); + } return arr; }