diff --git a/runtime/svelte-hooks.js b/runtime/svelte-hooks.js index e1f0f51..25a11e7 100644 --- a/runtime/svelte-hooks.js +++ b/runtime/svelte-hooks.js @@ -175,7 +175,7 @@ export const createProxiedComponent = ( // // And also, to support keyed list, it needs to be called each time the // component is moved (same as $$.fragment.m) - if (onMount) { + if (onMount && targetCmp.$$.fragment) { const m = targetCmp.$$.fragment.m targetCmp.$$.fragment.m = (...args) => { const result = m(...args)