diff options
Diffstat (limited to 'app/bits/static/error.js')
-rwxr-xr-x | app/bits/static/error.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/bits/static/error.js b/app/bits/static/error.js new file mode 100755 index 0000000..d16ae0b --- /dev/null +++ b/app/bits/static/error.js @@ -0,0 +1,9 @@ +window.onerror = (event, source, lineno, colno, error) => { + if (error.message === "FocusTrap: Element must have at least one focusable child.") return; + if (appLoading) { + document.getElementById("loadfailure").style.display = ""; + } else { + document.getElementById("error").style.display = "block"; + document.getElementById("error").innerText = error.stack; + } +}
\ No newline at end of file |