From cf6db57bb13ec65978233ca58effa8e34e9f243e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Tue, 9 Feb 2021 04:47:22 +0100 Subject: Prevent current page in grid to become negative MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the number of pages was -1 (which happens if there are no remote videos and thus "slots" becomes -1) the current page became -2. Signed-off-by: Daniel Calviño Sánchez --- src/components/CallView/Grid/Grid.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CallView/Grid/Grid.vue b/src/components/CallView/Grid/Grid.vue index b3eb8315d..4a62a524f 100644 --- a/src/components/CallView/Grid/Grid.vue +++ b/src/components/CallView/Grid/Grid.vue @@ -483,7 +483,7 @@ export default { numberOfPages() { if (this.currentPage >= this.numberOfPages) { - this.currentPage = this.numberOfPages - 1 + this.currentPage = Math.max(0, this.numberOfPages - 1) } }, }, -- cgit v1.2.3