From 8f0d498574efbfaa583c03e5310797b5bb91a178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Abaris?= Date: Fri, 6 Dec 2024 12:58:04 +0100 Subject: [PATCH] fast-element: Simplify conditional checks in element-controller Replaced explicit boolean comparisons with direct truthy and falsy checks in the `connectBehaviors` and `disconnectBehaviors` methods. --- .../fast-element/src/components/element-controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-components/fast-element/src/components/element-controller.ts b/packages/web-components/fast-element/src/components/element-controller.ts index 276403616d1..b420e8ddb69 100644 --- a/packages/web-components/fast-element/src/components/element-controller.ts +++ b/packages/web-components/fast-element/src/components/element-controller.ts @@ -411,7 +411,7 @@ export class ElementController } protected connectBehaviors() { - if (this.behaviorsConnected === false) { + if (!this.behaviorsConnected) { const behaviors = this.behaviors; if (behaviors !== null) { this.guardBehaviorConnection = true; @@ -427,7 +427,7 @@ export class ElementController } protected disconnectBehaviors() { - if (this.behaviorsConnected === true) { + if (this.behaviorsConnected) { const behaviors = this.behaviors; if (behaviors !== null) {