Remove dead code

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-05-14 14:42:32 +02:00
parent a3a9edd41a
commit 52f80293a2

View File

@ -108,24 +108,17 @@ async function flashImageToDrive(
goToSuccess();
}
} catch (error) {
// When flashing is cancelled before starting above there is no error
if (!error) {
return '';
}
notification.send(
'Oops! Looks like the flash failed.',
messages.error.flashFailure(path.basename(image.path), drives),
iconPath,
);
let errorMessage = getErrorMessageFromCode(error.code);
if (!errorMessage) {
error.image = basename;
analytics.logException(error);
errorMessage = messages.error.genericFlashError(error);
}
return errorMessage;
} finally {
availableDrives.setDrives([]);