Skip to content

Commit 81ffddf

Browse files
committed
simplify isCustomElement check
1 parent 6c250c6 commit 81ffddf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/internal/Component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function claim_component(block, parent_nodes) {
5555

5656
export function mount_component(component, target, anchor) {
5757
const { fragment, on_mount, on_destroy, after_update } = component.$$;
58-
const isCustomElement = ['connectedCallback', 'attributeChangedCallback', 'disconnectedCallback'].every((method) => typeof component[method] === 'function');
58+
const isCustomElement = Object.getPrototypeOf(component.constructor) === SvelteElement;
5959

6060
fragment && fragment.m(target, anchor);
6161

0 commit comments

Comments
 (0)