From 52f80293a29ba841112cd5cb75a13e5d6b877ea2 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 14 May 2020 14:42:32 +0200 Subject: [PATCH] Remove dead code Change-type: patch --- lib/gui/app/pages/main/Flash.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/gui/app/pages/main/Flash.tsx b/lib/gui/app/pages/main/Flash.tsx index 4dc8bf17..c7f382c1 100644 --- a/lib/gui/app/pages/main/Flash.tsx +++ b/lib/gui/app/pages/main/Flash.tsx @@ -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([]);