From a2df9a69dcc14cb70118cda2ded499055e7ee358 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 21 Aug 2022 17:31:56 +0200 Subject: m. update --- app/bits/assets/error.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 app/bits/assets/error.js (limited to 'app/bits/assets/error.js') diff --git a/app/bits/assets/error.js b/app/bits/assets/error.js new file mode 100755 index 0000000..d16ae0b --- /dev/null +++ b/app/bits/assets/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 -- cgit