fix: harden startup flow and auth re-entry

This commit is contained in:
Misaka
2026-03-21 11:02:17 +08:00
parent ed65312fff
commit 9a1f5a483e
10 changed files with 86 additions and 38 deletions

View File

@@ -115,7 +115,7 @@ export function setLogLevel(level: string): void {
}
// Add error-specific file transport in production
if (app.isPackaged) {
if (app?.isPackaged) {
logger.add(
new DailyRotateFile({
filename: path.join(getLogDir(), 'error-%DATE%.log'),