fix: install page blank - init() early return skipped route registration

This commit is contained in:
2026-08-16 21:27:46 +08:00
parent 6e9101a506
commit 1740a52cda

View File

@@ -19,7 +19,7 @@ const App = {
document.getElementById('site-title').textContent = window.__SITE_NAME__; document.getElementById('site-title').textContent = window.__SITE_NAME__;
document.getElementById('sidebar-title').textContent = window.__SITE_NAME__ || '举报系统'; document.getElementById('sidebar-title').textContent = window.__SITE_NAME__ || '举报系统';
} }
try { const s = await API.get('/install/status'); if (!s.installed) { location.hash = '#/install'; return; } } catch { location.hash = '#/install'; return; } try { const s = await API.get('/install/status'); if (!s.installed) location.hash = '#/install'; } catch { location.hash = '#/install'; }
this._footerLoaded = false; this._footerLoaded = false;
window.addEventListener('hashchange', () => this.route()); window.addEventListener('hashchange', () => this.route());
window.onerror = (msg, url, line, col, err) => { window.onerror = (msg, url, line, col, err) => {