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

Commit 24ab520

Browse files
committed
fix: properly 💀 on missing svelte3 component
1 parent db56e57 commit 24ab520

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

3in2/component.html

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

21+
if(!component || typeof component !== "function") {
22+
throw new Error("Invalid svelte3 component passed to wrapper");
23+
}
24+
2125
this.instance = new component({
2226
target : this.refs.root,
2327
props,

0 commit comments

Comments
 (0)