Commit 6ffefdcc authored by AUTOMATIC's avatar AUTOMATIC

fix js errors when restarting UI

parent 5623a3e7
function gradioApp() { 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; return !!gradioShadowRoot ? gradioShadowRoot : document;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment