From 3258807992051213a09c6a2f3930064de3ad7c6c Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 17 Mar 2019 15:28:56 +0000 Subject: [PATCH] usbboot: Fix linter Change-type: patch Signed-off-by: Juan Cruz Viotti --- lib/sdk/adapters/usbboot/index.js | 4 ++-- lib/sdk/adapters/usbboot/usb.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/sdk/adapters/usbboot/index.js b/lib/sdk/adapters/usbboot/index.js index c612d44f..2831c54f 100644 --- a/lib/sdk/adapters/usbboot/index.js +++ b/lib/sdk/adapters/usbboot/index.js @@ -449,10 +449,10 @@ class USBBootAdapter extends EventEmitter { message: 'LIBUSB_TRANSFER_CANCELLED' }, { message: 'LIBUSB_ERROR_NO_DEVICE' - }, ((error) => { + }, (error) => { debug(`Swallowed error: ${error.message} ${error.stack}`) return null - })).tap((result) => { + }).tap((result) => { if (result) { result.close() } diff --git a/lib/sdk/adapters/usbboot/usb.js b/lib/sdk/adapters/usbboot/usb.js index fb994a6c..b3fc4c37 100644 --- a/lib/sdk/adapters/usbboot/usb.js +++ b/lib/sdk/adapters/usbboot/usb.js @@ -74,9 +74,10 @@ exports.listDevices = () => { return device }) - console.log(devices.map((device) => { + console.log(_.map(devices, (device) => { const descriptor = device.deviceDescriptor - return `${descriptor.idVendor.toString(16)}:${descriptor.idProduct.toString(16)}` + const HEX_BASE = 16 + return `${descriptor.idVendor.toString(HEX_BASE)}:${descriptor.idProduct.toString(HEX_BASE)}` })) // Include driverless devices into the list of USB devices.