Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 1365315

Browse files
committed
fix: more complete svelte3 component cleanup
1 parent 5b3cb0f commit 1365315

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

3in2/component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
oncreate() {
1919
const { component, props } = this.get();
2020

21+
// TODO: someday this should support runtime setting/switching of the component value
2122
if(!component || typeof component !== "function") {
2223
throw new Error("Invalid svelte3 component passed to wrapper");
2324
}
@@ -32,6 +33,7 @@
3233

3334
ondestroy() {
3435
this.instance.$destroy();
36+
this.instance = null;
3537
},
3638
};
3739
</script>

0 commit comments

Comments
 (0)