Fix the torrent count if there's no torrent data
This commit is contained in:
parent
1cc826e97a
commit
99e74356e6
@ -49,7 +49,9 @@ export default (state = defaultState, action) =>
|
|||||||
case "TORRENTS_FETCH_FULFILLED":
|
case "TORRENTS_FETCH_FULFILLED":
|
||||||
draft.fetching = false;
|
draft.fetching = false;
|
||||||
draft.torrents = formatTorrents(action.payload.response.data);
|
draft.torrents = formatTorrents(action.payload.response.data);
|
||||||
draft.count = action.payload.response.data.length;
|
draft.count = action.payload.response.data
|
||||||
|
? action.payload.response.data.length
|
||||||
|
: 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "TORRENTS_SEARCH_PENDING":
|
case "TORRENTS_SEARCH_PENDING":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user