aboutsummaryrefslogtreecommitdiff
path: root/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'script.js')
-rw-r--r--script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/script.js b/script.js
index 978b948f..1b9a443f 100644
--- a/script.js
+++ b/script.js
@@ -2,7 +2,7 @@ function gradioApp() {
const elems = document.getElementsByTagName('gradio-app')
const elem = elems.length == 0 ? document : elems[0]
- elem.getElementById = function(id){ return document.getElementById(id) }
+ if (elem !== document) elem.getElementById = function(id){ return document.getElementById(id) }
return elem.shadowRoot ? elem.shadowRoot : elem
}