From 89c67b223bc858d7ae0642baf4095e3cb6dea3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Sat, 11 Mar 2023 11:46:36 +0800 Subject: [PATCH] fix error --- app/assets/javascripts/theater.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/javascripts/theater.js b/app/assets/javascripts/theater.js index 64dc847..f376069 100644 --- a/app/assets/javascripts/theater.js +++ b/app/assets/javascripts/theater.js @@ -435,8 +435,8 @@ window.GalleryTheater = function() { window.setMainPic = function(direction, selectedFromStrip) { var img = null; $('div.gallery-show-original a').eq(0).attr('href', currentPic.image.url) + img = imageContainer.find(".gal-active"); if (direction == null) { - img = $(""); img.hide(); img.attr("src", currentPic.image.file.theater.url); img.attr("alt", currentPic.image.alt_title); @@ -446,7 +446,6 @@ window.GalleryTheater = function() { }) isTheaterInitialized = true; } else { - img = imageContainer.find(".gal-active"); if (selectedFromStrip) { img = imageContainer.find(".gal-" + direction); img.attr("src", currentPic.image.file.theater.url);