Skip to content

Commit

Permalink
add parens to totalDeltaX/Y nullish coalesce
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Dec 8, 2024
1 parent c7ea7fe commit 17325bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/universal-remote-card.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/classes/remote-touchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ export class RemoteTouchpad extends BaseRemoteElement {
}

this.setDeltaXY(e);
const totalDeltaX = this.currentX ?? 0 - this.initialX;
const totalDeltaY = this.currentY ?? 0 - this.initialY;
const totalDeltaX = (this.currentX ?? 0) - this.initialX;
const totalDeltaY = (this.currentY ?? 0) - this.initialY;
console.log(`INITIAL: ${this.initialX},${this.initialY}`);
console.log(`CURRENT: ${this.currentX},${this.currentY}`);
console.log(`TOTAL DELTA: ${totalDeltaX},${totalDeltaY}`);
Expand Down

0 comments on commit 17325bb

Please sign in to comment.