From 6886108ee82f82775ec0f26ebecc16e5f42b2ad3 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 4 Mar 2024 23:22:22 -0500 Subject: [PATCH] Fix clear arena tags not working properly --- src/field/arena.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/field/arena.ts b/src/field/arena.ts index c631e94bd..ffecd77b4 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -434,9 +434,9 @@ export class Arena { } removeAllTags(): void { - for (let t of this.tags) { - t.onRemove(this); - this.tags.splice(this.tags.indexOf(t), 1); + while (this.tags.length) { + this.tags[0].onRemove(this); + this.tags.splice(0, 1); } }