Skip to content

Commit

Permalink
fix: conditionally disconnect attribute observer
Browse files Browse the repository at this point in the history
  • Loading branch information
renet committed Dec 15, 2021
1 parent 793d7b5 commit 84259b9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/liquid/components/ld-button/ld-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class LdButton implements InnerFocusable, ClonesAttributes {
this.el.removeEventListener('click', this.handleClick, {
capture: true,
})
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

private clickHiddenButton() {
Expand Down
2 changes: 1 addition & 1 deletion src/liquid/components/ld-checkbox/ld-checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class LdCheckbox implements InnerFocusable, ClonesAttributes {
}

disconnectedCallback() {
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/liquid/components/ld-input/ld-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export class LdInput implements InnerFocusable, ClonesAttributes {
}

disconnectedCallback() {
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/liquid/components/ld-label/ld-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class LdLabel implements ClonesAttributes {
}

disconnectedCallback() {
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/liquid/components/ld-radio/ld-radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export class LdRadio implements InnerFocusable, ClonesAttributes {
}

disconnectedCallback() {
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/liquid/components/ld-toggle/ld-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class LdToggle implements InnerFocusable, ClonesAttributes {
}

disconnectedCallback() {
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/liquid/components/ld-typo/ld-typo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class LdTypo implements ClonesAttributes {
}

disconnectedCallback() {
this.attributesObserver.disconnect()
this.attributesObserver?.disconnect()
}

render() {
Expand Down

0 comments on commit 84259b9

Please sign in to comment.