Skip to content

Commit 625159a

Browse files
fix(Storage): prevent loading reset on cancelled fetch
1 parent 78ecd20 commit 625159a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/store/reducers/storage.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,17 @@ const storage = function z(state = initialState, action) {
5757
};
5858
}
5959
case FETCH_STORAGE.FAILURE: {
60+
if (action.error.isCancelled) {
61+
return {
62+
...state,
63+
};
64+
}
65+
6066
return {
6167
...state,
6268
error: action.error,
6369
loading: false,
70+
wasLoaded: true,
6471
};
6572
}
6673
case SET_INITIAL: {

0 commit comments

Comments
 (0)