From 5498258700e188e3ef48a4fe3fd66361ca0f2430 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 23 Dec 2022 11:45:50 -0600 Subject: [PATCH] Don't yell about deleted persistent refs --- src/game/persistence.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/persistence.ts b/src/game/persistence.ts index 893d435..4f4714f 100644 --- a/src/game/persistence.ts +++ b/src/game/persistence.ts @@ -267,6 +267,9 @@ globalBus.on("addLayer", (layer: GenericLayer, saveData: Record // eslint-disable-next-line @typescript-eslint/no-explicit-any handleObject((layer as any)[ProxyState]); persistentRefs[layer.id].forEach(persistent => { + if (persistent[Deleted]) { + return; + } console.error( `Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`, persistent,