Skip to content

Commit

Permalink
simplify isCustomElement check
Browse files Browse the repository at this point in the history
  • Loading branch information
hontas committed Feb 11, 2021
1 parent 628f80e commit 971ca91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/internal/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 971ca91

Please sign in to comment.