summaryrefslogtreecommitdiff
path: root/app/bits/static/error.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/bits/static/error.js')
-rwxr-xr-xapp/bits/static/error.js9
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