Skip to content

Commit

Permalink
remove unnecessary .startsWith()
Browse files Browse the repository at this point in the history
  • Loading branch information
JovannMC committed Jul 20, 2024
1 parent eecc94c commit bd71121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HaritoraX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ export default class HaritoraX extends EventEmitter {

/**
* Fires the "battery" event to get the battery info of the trackers.
* Supported trackers: wireless
* Supported trackers: wireless, wired
* Supported connections: COM, Bluetooth
*
* @function fireTrackerBattery
Expand Down Expand Up @@ -1384,7 +1384,7 @@ function processWiredTrackerData(data: string, trackerName: string, currentButto
// example data: t:{"id":"button2", "type":"click", "start_time":6937744, "option":""}
// TODO: do more testing with wired trackers, find different "type"(s) and what "start_time" and "option" mean
const buttonData = JSON.parse(data);
if (trackerName.startsWith("HaritoraXWired")) {
if (trackerName === "HaritoraXWired") {
if (buttonData.id === "button1") {
currentButtons[MAIN_BUTTON_INDEX] += 1;
return "main";
Expand Down

0 comments on commit bd71121

Please sign in to comment.