From a85358a9ed7d8dc95e34f7fb0de2e2195a7df2fc Mon Sep 17 00:00:00 2001 From: pushkin Date: Thu, 29 Oct 2020 17:59:14 +0100 Subject: [PATCH] Update Component.ts --- src/runtime/internal/Component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index 459a78031a..a3b36f0e78 100644 --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -148,15 +148,13 @@ export function init(component, options, instance, create_fragment, not_equal, p if (options.target) { if (options.hydrate) { const nodes = children(options.target); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment!.l(nodes); + claim_component($$.fragment, nodes); nodes.forEach(detach); } else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment!.c(); + create_component($$.fragment); } - if (options.intro) transition_in(component.$$.fragment); + if (options.intro) transition_in($$.fragment); mount_component(component, options.target, options.anchor); flush(); }