From 305fb148e463189a67a0dd70e250ddf767a2f6b6 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Wed, 20 May 2020 17:16:27 -0700 Subject: [PATCH] Check for false fragment --- runtime/svelte-hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)