summaryrefslogtreecommitdiff
path: root/assets/error.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-07-11 18:54:20 +0200
committerMinteck <contact@minteck.org>2022-07-11 18:54:20 +0200
commitf2824f51f8ed407a8633ba968d35d56ea6a36f49 (patch)
treedb0c625ccd8ae4ada52f4e30956a9627270dec31 /assets/error.js
parent5abe8cba55965f70e07e1163239bcc9d797c864a (diff)
downloadbits-client-f2824f51f8ed407a8633ba968d35d56ea6a36f49.tar.gz
bits-client-f2824f51f8ed407a8633ba968d35d56ea6a36f49.tar.bz2
bits-client-f2824f51f8ed407a8633ba968d35d56ea6a36f49.zip
Diffstat (limited to 'assets/error.js')
-rw-r--r--assets/error.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/assets/error.js b/assets/error.js
new file mode 100644
index 0000000..5bb741a
--- /dev/null
+++ b/assets/error.js
@@ -0,0 +1,5 @@
+window.onerror = (event, source, lineno, colno, error) => {
+ if (error.message === "FocusTrap: Element must have at least one focusable child.") return;
+ document.getElementById("error").style.display = "block";
+ document.getElementById("error").innerText = error.stack;
+} \ No newline at end of file