diff --git a/frontend/js/reducers/torrents.js b/frontend/js/reducers/torrents.js index 920ba1b..405a579 100644 --- a/frontend/js/reducers/torrents.js +++ b/frontend/js/reducers/torrents.js @@ -49,7 +49,9 @@ 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; + draft.count = action.payload.response.data + ? action.payload.response.data.length + : 0; break; case "TORRENTS_SEARCH_PENDING":