From c489db81b13ca0c1e41e82e95a42e12dea861c81 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 27 May 2023 19:03:52 +0100 Subject: [PATCH] Protect loop from undefined error inside fixBrokenOfflineMapWaves() when map has missing waves array --- project/src/controllers/GameController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index e643fae0..4b0001a5 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -285,7 +285,7 @@ export class GameController continue; } - for (const wave of location.base.waves) + for (const wave of location.base.waves ?? []) { if ((wave.slots_max - wave.slots_min === 0)) {