diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-02-09 06:47:22 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-02-09 06:47:22 +0300 |
commit | cf6db57bb13ec65978233ca58effa8e34e9f243e (patch) | |
tree | 9ba71a37224fea5dae72f789ba8b17211049b3a8 | |
parent | d56d1a15d2944cb27e36ee6af947fe18de06da5d (diff) |
Prevent current page in grid to become negative
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 <danxuliu@gmail.com>
-rw-r--r-- | src/components/CallView/Grid/Grid.vue | 2 |
1 files changed, 1 insertions, 1 deletions
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) } }, }, |