mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-12-06 19:56:45 +10:30
fix: add safer dom for analytics
This commit is contained in:
1 parent
b8709f6391
commit
0e696e0175
1 file changed
+9
-1
@@ -28,7 +28,15 @@ async function loadAnalyticsPageInner(): Promise<void> {
|
||||
});
|
||||
document.querySelector('[data-key="analytics"]')?.classList.add("active");
|
||||
|
||||
const main = (await waitForElm("#main", true, 100, 60)) as HTMLElement;
|
||||
let main: HTMLElement;
|
||||
try {
|
||||
main = (await waitForElm("#main", true, 100, 60)) as HTMLElement;
|
||||
} catch {
|
||||
console.warn(
|
||||
"[BetterSEQTA+] Analytics: timed out waiting for #main (shell not ready).",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
main.innerHTML = "";
|
||||
main.style.overflow = "auto";
|
||||
|
||||
Reference in new issue
Block a user