Skip to content

Commit

Permalink
refactor(shared): focusable, simplify conditional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Nov 24, 2020
1 parent 079c74a commit 0283b7e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/shared/src/focusable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,8 @@ export class Focusable extends FocusVisiblePolyfillMixin(SpectrumElement) {
protected updated(changedProperties: PropertyValues): void {
super.updated(changedProperties);

if (changedProperties.has('disabled')) {
if (this.disabled) {
this.blur();
}
if (changedProperties.has('disabled') && this.disabled) {
this.blur();
}
}

Expand Down

0 comments on commit 0283b7e

Please sign in to comment.