fix: permission detection when device not plugged (#653)
This commit is contained in:
committed by
László Monda
parent
fc728697d7
commit
18fc2e6b3f
@@ -52,6 +52,10 @@ export class UhkHidDevice {
|
||||
|
||||
const dev = devices().find((x: Device) => isUhkDevice(x) || x.productId === Constants.BOOTLOADER_ID);
|
||||
|
||||
if (!dev) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const device = new HID(dev.path);
|
||||
device.close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user