Skip to content

Commit

Permalink
fix: prevent change of modal image if src isn’t set
Browse files Browse the repository at this point in the history
  • Loading branch information
jakowenko committed Jun 22, 2023
1 parent f3eb1de commit 7111e90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/views/GalleryView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ const closeModal = () => {
};
const modalImage = async (direction: 'next' | 'prev') => {
if (!modal.value.src) return;
if (allImageIds.value.length !== total.value.images) {
if (direction === 'next' && modal.value.image.id === _.last(allImageIds.value)) {
modal.value.src = '';
Expand Down

0 comments on commit 7111e90

Please sign in to comment.