From 6e993dd095afaf3d9b27223c795d57fcb4e0cb07 Mon Sep 17 00:00:00 2001 From: Weidi Deng Date: Tue, 5 Jan 2021 15:49:46 +0800 Subject: [PATCH] fix logic --- frontend/src/components/files/Preview.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/files/Preview.vue b/frontend/src/components/files/Preview.vue index 360939cf..b944ff71 100644 --- a/frontend/src/components/files/Preview.vue +++ b/frontend/src/components/files/Preview.vue @@ -218,7 +218,7 @@ export default { if (this.isGallery && this.listing[j].type === 'image') { this.previousLink = this.listing[j].url break - } else if (mediaTypes.includes(this.listing[j].type)) { + } else if (!this.isGallery && mediaTypes.includes(this.listing[j].type)) { this.previousLink = this.listing[j].url break } @@ -228,7 +228,7 @@ export default { if (this.isGallery && this.listing[j].type === 'image') { this.nextLink = this.listing[j].url break - } else if (mediaTypes.includes(this.listing[j].type)) { + } else if (!this.isGallery && mediaTypes.includes(this.listing[j].type)) { this.nextLink = this.listing[j].url break }