Skip to content

Commit c31c958

Browse files
committed
Second time ignoring dialog we are here
1 parent ef239a7 commit c31c958

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/js/tabs/firmware_flasher.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,17 @@ firmware_flasher.initialize = async function (callback) {
806806
// Maybe the board is in DFU mode, but it does not have permissions. Ask for them.
807807
console.log(`${self.logHead} No valid port detected, asking for permissions`);
808808

809-
DFU.requestPermission().then((device) => {
810-
DFU.connect(device.path, firmware, options);
811-
});
809+
DFU.requestPermission()
810+
.then((device) => {
811+
DFU.connect(device.path, firmware, options);
812+
})
813+
.catch((error) => {
814+
console.error("Permission request denied", error);
815+
self.flashingMessage(
816+
i18n.getMessage("firmwareFlasherNoDevice"),
817+
self.FLASH_MESSAGE_TYPES.INVALID,
818+
);
819+
});
812820
}
813821

814822
GUI.interval_resume("sponsor");

0 commit comments

Comments
 (0)