No code repeat

This commit is contained in:
apolinario 2022-12-10 12:51:40 +01:00
parent 8eb638cdd3
commit 37139d8aac
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
function gradioApp(){
return !!document.getElementsByTagName('gradio-app')[0].shadowRoot ? document.getElementsByTagName('gradio-app')[0].shadowRoot : document;
function gradioApp() {
const gradioShadowRoot = document.getElementsByTagName('gradio-app')[0].shadowRoot
return !!gradioShadowRoot ? gradioShadowRoot : document;
}
function get_uiCurrentTab() {