diff --git a/modules/extensions.py b/modules/extensions.py index 8107a933f..a14ffbf04 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -6,6 +6,7 @@ import time import git from modules import paths, shared +from modules.paths_internal import extensions_dir, extensions_builtin_dir extensions = [] diff --git a/script.js b/script.js index 978b948f4..1b9a443f9 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 }