diff --git a/src/util/save.ts b/src/util/save.ts index 3f5f1d6..6e602e4 100644 --- a/src/util/save.ts +++ b/src/util/save.ts @@ -102,8 +102,10 @@ export async function loadSave(playerObj: Partial): Promise { const { fixOldSave, getInitialLayers } = await import("data/projEntry"); for (const layer in layers) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - removeLayer(layers[layer]!); + const l = layers[layer]; + if (l) { + removeLayer(l); + } } getInitialLayers(playerObj).forEach(layer => addLayer(layer, playerObj));