Merge pull request #2517 from melloware/PV2516

Fix #2516: Carousel less items than allocated slots
pull/2561/head
Tuğçe Küçükoğlu 2022-05-24 15:22:32 +03:00 committed by GitHub
commit c10f6e0036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -477,7 +477,7 @@ export default {
}, },
computed: { computed: {
totalIndicators() { totalIndicators() {
return this.value ? Math.ceil((this.value.length - this.d_numVisible) / this.d_numScroll) + 1 : 0; return this.value ? Math.max(Math.ceil((this.value.length - this.d_numVisible) / this.d_numScroll) + 1, 0) : 0;
}, },
backwardIsDisabled() { backwardIsDisabled() {
return (this.value && (!this.circular || this.value.length < this.d_numVisible) && this.d_page === 0); return (this.value && (!this.circular || this.value.length < this.d_numVisible) && this.d_page === 0);