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: {