aboutsummaryrefslogtreecommitdiff
path: root/javascript/imageviewer.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-04-29 22:13:40 +0300
committerGitHub <noreply@github.com>2023-04-29 22:13:40 +0300
commit15c4e78b44e14d70b82dcb5b563251fed7be0766 (patch)
tree6f1acaae50a49544a08384b52739df3e2d803a10 /javascript/imageviewer.js
parent3e5b3c79e49ec3a10174c250815dabce6efdddca (diff)
parent2e78e65a22bfa6b116ae18d12fdcb85ec8acd727 (diff)
Merge branch 'dev' into feature/restore-progress
Diffstat (limited to 'javascript/imageviewer.js')
-rw-r--r--javascript/imageviewer.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js
index d6483562..3deffa9b 100644
--- a/javascript/imageviewer.js
+++ b/javascript/imageviewer.js
@@ -251,8 +251,11 @@ document.addEventListener("DOMContentLoaded", function() {
modal.appendChild(modalNext)
- gradioApp().appendChild(modal)
-
+ try {
+ gradioApp().appendChild(modal);
+ } catch (e) {
+ gradioApp().body.appendChild(modal);
+ }
document.body.appendChild(modal);