diff --git a/gui/dashboard/app.svelte b/gui/dashboard/app.svelte index 0b6c47d..3be21e3 100644 --- a/gui/dashboard/app.svelte +++ b/gui/dashboard/app.svelte @@ -10,7 +10,6 @@ let placesLeft = size; let pageNum = -1; let pageCount = 1; - let pageCountFreePlaces = 1; let tiles = []; let time = ''; let globalData = {}; @@ -50,12 +49,12 @@ servicesTemp = servicesDown.slice(0, size); pageCount = Math.ceil(upOrUnknown.length / size); placesLeft = size - servicesTemp.length; - pageCountFreePlaces = Math.ceil(upOrUnknown.length / placesLeft); + pageCount = Math.ceil(upOrUnknown.length / placesLeft); if (pageNum === -1 || total >= size) { pageNum++; - if (pageNum > pageCount) { + if (pageNum >= pageCount) { pageNum = 0; } } @@ -132,9 +131,12 @@