1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-06 00:03:29 +00:00

Add null check when calling win.webContents (#397)

This commit is contained in:
Thomas Rittson
2021-06-02 07:00:44 +10:00
committed by GitHub
parent ca61e13b57
commit b1d9b84eae

View File

@@ -42,7 +42,7 @@ export class ElectronMainMessagingService implements MessagingService {
});
nativeTheme.on('updated', () => {
windowMain.win.webContents.send('systemThemeUpdated', nativeTheme.shouldUseDarkColors ? 'dark' : 'light');
windowMain.win?.webContents.send('systemThemeUpdated', nativeTheme.shouldUseDarkColors ? 'dark' : 'light');
});
}