mirror of https://github.com/jetkvm/kvm.git
Fix CoPilot/Lint complaints
This commit is contained in:
parent
e12ddaff79
commit
2698fbd541
|
|
@ -52,7 +52,6 @@ func GetQueueIndex(messageType MessageType) (int, time.Duration) {
|
|||
return MacroQueue, 60 * time.Second
|
||||
default:
|
||||
return OtherQueue, 5 * time.Second
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue