diff options
author | yfszzx <yfszzx@gmail.com> | 2022-10-17 07:23:32 +0000 |
---|---|---|
committer | yfszzx <yfszzx@gmail.com> | 2022-10-17 07:23:32 +0000 |
commit | 2a3e7ed872dc9b8da27cccc7f78df092f4a2f578 (patch) | |
tree | 5a288fe646eb58d35f4079b734a6d3765a98fd3f /javascript/imageviewer.js | |
parent | 5b1394bead93e5485ced5de10f1c000eea4458c6 (diff) | |
parent | cccc5a20fce4bde9a4299f8790366790735f1d05 (diff) | |
download | stable-diffusion-webui-gfx803-2a3e7ed872dc9b8da27cccc7f78df092f4a2f578.tar.gz stable-diffusion-webui-gfx803-2a3e7ed872dc9b8da27cccc7f78df092f4a2f578.tar.bz2 stable-diffusion-webui-gfx803-2a3e7ed872dc9b8da27cccc7f78df092f4a2f578.zip |
Merge branch 'master' of https://github.com/yfszzx/stable-diffusion-webui-plus
Diffstat (limited to 'javascript/imageviewer.js')
-rw-r--r-- | javascript/imageviewer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index 65a33dd7..d4ab6984 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -31,7 +31,7 @@ function updateOnBackgroundChange() { } }) - if (modalImage.src != currentButton.children[0].src) { + if (currentButton?.children?.length > 0 && modalImage.src != currentButton.children[0].src) { modalImage.src = currentButton.children[0].src; if (modalImage.style.display === 'none') { modal.style.setProperty('background-image', `url(${modalImage.src})`) |