From 534f3a7469dd1904c690daf4815304a552153831 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 11 Sep 2018 14:00:41 +0200 Subject: [PATCH] fix(gui): Always show the "success" screen Change-type: patch Signed-off-by: Alexis Svinartchouk --- lib/gui/modules/child-writer.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/gui/modules/child-writer.js b/lib/gui/modules/child-writer.js index eba81709..bead21f8 100644 --- a/lib/gui/modules/child-writer.js +++ b/lib/gui/modules/child-writer.js @@ -85,22 +85,6 @@ const handleError = (error) => { terminate(EXIT_CODES.GENERAL_ERROR) } -/** - * @summary returns the last value in a Map - * @param {Map} map - map - * @returns {Any} the last value of the map (in insertion order) - * - * @example - * const last = lastMapValue(map) - */ -const lastMapValue = (map) => { - let value = null - for (value of map.values()) { - // eslint-disable-next-line no-empty - } - return value -} - /** * @summary writes the source to the destinations and valiates the writes * @param {SourceDestination} source - source @@ -127,10 +111,6 @@ const writeAndValidate = (source, destinations, verify, onProgress, onFail, onFi ) }) .then(({ failures, bytesWritten }) => { - // If all destinations errored, treat the last fail as an error - if (failures.size === destinations.length) { - throw lastMapValue(failures) - } const result = { bytesWritten, devices: {