Update the torrent state only if new data is provided
This commit is contained in:
parent
33a84f682d
commit
135ddd0c93
@ -48,8 +48,10 @@ export default (state = defaultState, action) =>
|
||||
|
||||
case "TORRENTS_FETCH_FULFILLED":
|
||||
draft.fetching = false;
|
||||
draft.torrents = formatTorrents(action.payload.response.data);
|
||||
draft.count = action.payload.response.data.length;
|
||||
if (action.payload.response.data) {
|
||||
draft.torrents = formatTorrents(action.payload.response.data);
|
||||
draft.count = action.payload.response.data.length;
|
||||
}
|
||||
break;
|
||||
|
||||
case "TORRENTS_SEARCH_PENDING":
|
||||
|
Loading…
x
Reference in New Issue
Block a user