Skip to content

Commit

Permalink
Merge pull request #15730 from bluelovers/patch-2
Browse files Browse the repository at this point in the history
Update imageviewer.js
  • Loading branch information
AUTOMATIC1111 authored Jun 8, 2024
2 parents debc6dd + dd93c47 commit 4aebfe9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions javascript/imageviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,7 @@ function modalImageSwitch(offset) {
var galleryButtons = all_gallery_buttons();

if (galleryButtons.length > 1) {
var currentButton = selected_gallery_button();

var result = -1;
galleryButtons.forEach(function(v, i) {
if (v == currentButton) {
result = i;
}
});
var result = selected_gallery_index();

if (result != -1) {
var nextButton = galleryButtons[negmod((result + offset), galleryButtons.length)];
Expand Down

0 comments on commit 4aebfe9

Please sign in to comment.