From bd711214f079f9d8c5b865e4cff0e720be4ecf23 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Sun, 21 Jul 2024 02:42:35 +0300 Subject: [PATCH] remove unnecessary .startsWith() --- src/HaritoraX.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HaritoraX.ts b/src/HaritoraX.ts index a86499e..55ccc0a 100644 --- a/src/HaritoraX.ts +++ b/src/HaritoraX.ts @@ -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 @@ -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";