From 460de3a2b69ac1159fbaa8eb76ac1fa960399583 Mon Sep 17 00:00:00 2001 From: rgantzos <86856959+rgantzos@users.noreply.github.com> Date: Sat, 30 Nov 2024 09:41:35 -0800 Subject: [PATCH] Fix duplicates in `select-self` --- features/select-self/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/select-self/script.js b/features/select-self/script.js index 233076c2..2eb3ef86 100644 --- a/features/select-self/script.js +++ b/features/select-self/script.js @@ -88,7 +88,9 @@ export default async function ({ feature, console }) { feature.self.enabled || feature.traps.vm.runtime._editingTarget?.sprite?.name !== SPRITES[i] ) { - data.push([SPRITES[i], SPRITES[i]]); + if (!data.find((el) => el[0] === SPRITES[i])) { + data.push([SPRITES[i], SPRITES[i]]); + } } }