From 2698fbd5411d6095e801bb07e795248fd3ffd7db Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Wed, 5 Nov 2025 14:56:27 -0600 Subject: [PATCH] Fix CoPilot/Lint complaints --- internal/hidrpc/hidrpc.go | 1 - ui/src/hooks/hidRpc.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/hidrpc/hidrpc.go b/internal/hidrpc/hidrpc.go index 88f584af..c36f564c 100644 --- a/internal/hidrpc/hidrpc.go +++ b/internal/hidrpc/hidrpc.go @@ -52,7 +52,6 @@ func GetQueueIndex(messageType MessageType) (int, time.Duration) { return MacroQueue, 60 * time.Second default: return OtherQueue, 5 * time.Second - } } diff --git a/ui/src/hooks/hidRpc.ts b/ui/src/hooks/hidRpc.ts index dbdbfde1..1b3a3829 100644 --- a/ui/src/hooks/hidRpc.ts +++ b/ui/src/hooks/hidRpc.ts @@ -386,7 +386,7 @@ export class CancelKeyboardMacroReportMessage extends RpcMessage { constructor(token: string) { super(HID_RPC_MESSAGE_TYPES.CancelKeyboardMacroReport); - this.token = (token == null || token === undefined || token === "") + this.token = (token == null || token === "") ? "00000000-0000-0000-0000-000000000000" : token; } @@ -397,11 +397,11 @@ export class CancelKeyboardMacroReportMessage extends RpcMessage { } public static unmarshal(data: Uint8Array): CancelKeyboardMacroReportMessage | undefined { - if (data.length == 0) { + if (data.length === 0) { return new CancelKeyboardMacroReportMessage("00000000-0000-0000-0000-000000000000"); } - if (data.length != 16) { + if (data.length !== 16) { throw new Error(`Invalid cancel message length: ${data.length}`); }