diff --git a/src/main/app.ts b/src/main/app.ts index 380d77e7..99d28b6e 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -170,7 +170,7 @@ export const listenerAppEvent = (startApp: () => void) => { nativeTheme.addListener('updated', (event: any) => { const themeInfo: Electron.NativeTheme = event.sender - global.lx.event_app.system_theme_change(themeInfo.shouldUseDarkColors) + global.lx?.event_app.system_theme_change(themeInfo.shouldUseDarkColors) }) }