Skip to content

Commit 0c428e1

Browse files
WIP: refactor: simplify var assignment
1 parent 1171951 commit 0c428e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/resources/META-INF/resources/frontend/fc-toggle-button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class ToggleButton extends LitElement {
456456
const maxTranslate = switchEl ? switchEl.offsetWidth - sliderWidth - gap * 2 : 20;
457457
const threshold = maxTranslate * 0.5;
458458

459-
const newChecked = dx > 0 ? true : false;
459+
const newChecked = dx > 0;
460460
if (Math.abs(dx) >= threshold && newChecked !== this.checked) {
461461
this.checked = newChecked;
462462
this._fireChange();

0 commit comments

Comments
 (0)