From 971ca91cb73bbd624fe1984a977e36069251e7ab Mon Sep 17 00:00:00 2001 From: hontas Date: Thu, 16 Jul 2020 10:26:06 +0200 Subject: [PATCH] simplify isCustomElement check --- src/runtime/internal/Component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts index 8478723477..c71a0bfc56 100644 --- a/src/runtime/internal/Component.ts +++ b/src/runtime/internal/Component.ts @@ -55,7 +55,7 @@ export function claim_component(block, parent_nodes) { export function mount_component(component, target, anchor) { const { fragment, on_mount, on_destroy, after_update } = component.$$; - const isCustomElement = ['connectedCallback', 'attributeChangedCallback', 'disconnectedCallback'].every((method) => typeof component[method] === 'function'); + const isCustomElement = Object.getPrototypeOf(component.constructor) === SvelteElement; fragment && fragment.m(target, anchor);