diff --git a/src/js/port_handler.js b/src/js/port_handler.js index 29b51eefa3d..44b70bf7a52 100644 --- a/src/js/port_handler.js +++ b/src/js/port_handler.js @@ -121,64 +121,43 @@ PortHandler.check_serial_devices = function () { PortHandler.check_usb_devices = function (callback) { const self = this; - const portSelect = document.querySelector('#port'); chrome.usb.getDevices(usbDevices, function (result) { - const dfuActive = !!portSelect.value.startsWith('DFU'); + const dfuElement = self.portPickerElement.children("[value='DFU']"); if (result.length) { // Found device in DFU mode, add it to the list - if (!dfuActive) { + if (!dfuElement.length) { self.clearOptions(); - // self.portPickerElement.append($('