Fix CoPilot complaints

This commit is contained in:
Marc Brooks 2025-11-05 14:56:27 -06:00
parent e12ddaff79
commit 8e00b3d581
No known key found for this signature in database
GPG Key ID: 583A6AF2D6AE1DC6
1 changed files with 3 additions and 3 deletions

View File

@ -386,7 +386,7 @@ export class CancelKeyboardMacroReportMessage extends RpcMessage {
constructor(token: string) { constructor(token: string) {
super(HID_RPC_MESSAGE_TYPES.CancelKeyboardMacroReport); super(HID_RPC_MESSAGE_TYPES.CancelKeyboardMacroReport);
this.token = (token == null || token === undefined || token === "") this.token = (token == null || token === "")
? "00000000-0000-0000-0000-000000000000" ? "00000000-0000-0000-0000-000000000000"
: token; : token;
} }
@ -397,11 +397,11 @@ export class CancelKeyboardMacroReportMessage extends RpcMessage {
} }
public static unmarshal(data: Uint8Array): CancelKeyboardMacroReportMessage | undefined { public static unmarshal(data: Uint8Array): CancelKeyboardMacroReportMessage | undefined {
if (data.length == 0) { if (data.length === 0) {
return new CancelKeyboardMacroReportMessage("00000000-0000-0000-0000-000000000000"); 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}`); throw new Error(`Invalid cancel message length: ${data.length}`);
} }