diff --git a/src/components/3d/PublicPreview.svelte b/src/components/3d/PublicPreview.svelte index 87bfa44..46ae07a 100644 --- a/src/components/3d/PublicPreview.svelte +++ b/src/components/3d/PublicPreview.svelte @@ -88,11 +88,13 @@ }); onDestroy(() => { - loaded = false; + if (loaded) { + loaded = false; - renderer.dispose(); - scene.clear(); - light.dispose(); + renderer.dispose(); + scene.clear(); + light.dispose(); + } }) function handleResize() {