Only store the first error for each target

Changelog-entry: Show the first error for each drive (not the last)
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-12-16 12:33:17 +01:00
parent fc45df270a
commit c54856a616

View File

@ -85,6 +85,10 @@ export function addFailedDeviceError({
const failedDeviceErrorsMap = new Map(
store.getState().toJS().failedDeviceErrors,
);
if (failedDeviceErrorsMap.has(device.device)) {
// Only store the first error
return;
}
failedDeviceErrorsMap.set(device.device, {
description: device.description,
device: device.device,