From 76db2dd26a314dacc34df77f69142473d7cd6e65 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 4 Jan 2025 02:29:04 +0000 Subject: [PATCH] Don't show an error pop up when cancelling an upload manually. --- src/mami.js/eeprom/eeprom.js | 2 +- src/mami.js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mami.js/eeprom/eeprom.js b/src/mami.js/eeprom/eeprom.js index 4d4dfff..4f001af 100644 --- a/src/mami.js/eeprom/eeprom.js +++ b/src/mami.js/eeprom/eeprom.js @@ -69,7 +69,7 @@ const MamiEEPROM = function(endPoint, getAuthLine) { return Object.freeze(body); } catch(ex) { if(userAborted) - throw 'Upload has been cancelled by the user.'; + throw ''; console.error(ex); throw ex; diff --git a/src/mami.js/main.js b/src/mami.js/main.js index 4bc1a34..2139a2c 100644 --- a/src/mami.js/main.js +++ b/src/mami.js/main.js @@ -784,7 +784,7 @@ const MamiInit = async args => { if(settings.get('eepromAutoInsert')) entry.clickOption('insert'); } catch(ex) { - if(!ex.aborted) { + if(ex !== '') { console.error(ex); ctx.msgbox.show({ body: ['An error occurred while trying to upload a file:', ex] }); }