File tree Expand file tree Collapse file tree
src/lib/profiles/(unauthenticated) Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 import { Typography , Card } from ' @appwrite.io/pink-svelte' ;
55 import { resolvedProfile } from ' $lib/profiles/index.svelte' ;
66 import UnicornScene from ' ./studio.json?url' ;
7- import { onMount } from ' svelte' ;
7+ import { onDestroy , onMount } from ' svelte' ;
88 import { Tween } from ' svelte/motion' ;
99
1010 async function isUnicornAvailable() {
2121 const opacity = new Tween (0 );
2222
2323 onMount (async () => {
24+ if (' UnicornStudio' in window ) delete window .UnicornStudio ;
2425 await isUnicornAvailable ();
2526 // @ts-expect-error the typings are trash
2627 // eslint-disable-next-line no-undef
2728 await UnicornStudio .init ();
2829 opacity .target = 1 ;
2930 });
31+
32+ onDestroy (() => {
33+ // @ts-expect-error the typings are trash
34+ delete window .UnicornStudio ;
35+ });
3036 </script >
3137
3238<svelte:head >
You can’t perform that action at this time.
0 commit comments