Skip to content

Commit a7a272b

Browse files
author
Ives van Hoorne
committed
Fix error handling
1 parent db03592 commit a7a272b

File tree

1 file changed

+2
-1
lines changed
  • src/app/store/entities/sandboxes/modules

1 file changed

+2
-1
lines changed

src/app/store/entities/sandboxes/modules/reducer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ function moduleReducer(module, action) {
1919
case SET_MODULE_SYNCED:
2020
return { ...module, isNotSynced: false };
2121
case SET_MODULE_ERROR:
22-
return { ...module, error: action.error };
22+
// Don't let errors overwrite eachother, because the first error is probably the cause for the second one'
23+
return module.error ? module : { ...module, error: action.error };
2324
default:
2425
return module;
2526
}

0 commit comments

Comments
 (0)