diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index a0bd2db7..6ce8eef2 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -265,7 +265,7 @@ class Logs extends Component { fetchData = (state) => { const { pageSize, page, pages } = state; const { allLogs, filter } = this.props.queryLogs; - const isLastPage = page + 1 === pages; + const isLastPage = pages && (page + 1 === pages); if (isLastPage) { const lastRow = allLogs[allLogs.length - 1]; diff --git a/client/src/reducers/queryLogs.js b/client/src/reducers/queryLogs.js index 857a6ae1..2f04099b 100644 --- a/client/src/reducers/queryLogs.js +++ b/client/src/reducers/queryLogs.js @@ -90,7 +90,7 @@ const queryLogs = handleActions( logs: [], interval: 1, allLogs: [], - pages: 1, + pages: 0, total: 0, enabled: true, older_than: '',