clean observer

pull/15352/head
adiguba 2 years ago
parent 2ae5869f52
commit be008aeb85

@ -1,4 +1,6 @@
<script> <script>
import { onDestroy } from "svelte";
let { let {
clazz = 'custom', clazz = 'custom',
foo = true, foo = true,
@ -32,6 +34,8 @@
return result; return result;
} }
onDestroy(() => { if (observer) observer.disconnect(); });
</script> </script>
<main id="main" class:browser> <main id="main" class:browser>

Loading…
Cancel
Save