From da5553364aa52112ff1e6b09d88d68d388eca3a0 Mon Sep 17 00:00:00 2001 From: antelle Date: Fri, 12 Mar 2021 23:37:29 +0100 Subject: [PATCH] using proper call sequence in node-usb-detection --- desktop/native-module-host.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/native-module-host.js b/desktop/native-module-host.js index 48ec70de..2e516ccf 100644 --- a/desktop/native-module-host.js +++ b/desktop/native-module-host.js @@ -17,13 +17,13 @@ const messageHandlers = { const usbDetection = reqNative('usb-detection'); - fillAttachedYubiKeys(); - usbDetection.registerAdded(usbDeviceAttached); usbDetection.registerRemoved(usbDeviceDetached); usbDetection.startMonitoring(); + fillAttachedYubiKeys(); + usbListenerRunning = true; },