Don't yell about deleted persistent refs
This commit is contained in:
parent
65071760ec
commit
5498258700
1 changed files with 3 additions and 0 deletions
|
@ -267,6 +267,9 @@ globalBus.on("addLayer", (layer: GenericLayer, saveData: Record<string, unknown>
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
handleObject((layer as any)[ProxyState]);
|
handleObject((layer as any)[ProxyState]);
|
||||||
persistentRefs[layer.id].forEach(persistent => {
|
persistentRefs[layer.id].forEach(persistent => {
|
||||||
|
if (persistent[Deleted]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
console.error(
|
console.error(
|
||||||
`Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,
|
`Created persistent ref in ${layer.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,
|
||||||
persistent,
|
persistent,
|
||||||
|
|
Loading…
Reference in a new issue