mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
fix js errors when restarting UI
This commit is contained in:
parent
5623a3e7b1
commit
6ffefdcc9f
@ -1,5 +1,6 @@
|
||||
function gradioApp() {
|
||||
const gradioShadowRoot = document.getElementsByTagName('gradio-app')[0].shadowRoot
|
||||
const elems = document.getElementsByTagName('gradio-app')
|
||||
const gradioShadowRoot = elems.length == 0 ? null : elems[0].shadowRoot
|
||||
return !!gradioShadowRoot ? gradioShadowRoot : document;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user