Protect loop from undefined error inside fixBrokenOfflineMapWaves() when map has missing waves array

This commit is contained in:
Dev 2023-05-27 19:03:52 +01:00
parent e2b1d4d0c6
commit c489db81b1

View File

@ -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))
{