fix: Don't break in `attributeChangedCallback` if `$$component` does not exist yet (#8701)

Since the custom element class waits one tick before instantiating the `$$component` field, it's possibly undefined when `attributeChangedCallback` is called.
pull/8734/head
mimbrown 2 years ago committed by GitHub
parent f580e2e0c8
commit 4f1063723e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -287,7 +287,7 @@ if (typeof HTMLElement === 'function') {
this.$$props_definition,
'toProp'
);
this.$$component.$set({ [attr]: this.$$data[attr] });
this.$$component?.$set({ [attr]: this.$$data[attr] });
}
disconnectedCallback() {

Loading…
Cancel
Save