Skip to content

Commit

Permalink
fast-element: Simplify conditional checks in element-controller
Browse files Browse the repository at this point in the history
Replaced explicit boolean comparisons with direct truthy and falsy
checks in the `connectBehaviors` and `disconnectBehaviors` methods.
  • Loading branch information
doguabaris committed Dec 6, 2024
1 parent 0a21092 commit 8f0d498
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export class ElementController<TElement extends HTMLElement = HTMLElement>
}

protected connectBehaviors() {
if (this.behaviorsConnected === false) {
if (!this.behaviorsConnected) {
const behaviors = this.behaviors;
if (behaviors !== null) {
this.guardBehaviorConnection = true;
Expand All @@ -427,7 +427,7 @@ export class ElementController<TElement extends HTMLElement = HTMLElement>
}

protected disconnectBehaviors() {
if (this.behaviorsConnected === true) {
if (this.behaviorsConnected) {
const behaviors = this.behaviors;

if (behaviors !== null) {
Expand Down

0 comments on commit 8f0d498

Please sign in to comment.