mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-01-24 06:02:54 +01:00
Reload the window only if it's open
This commit is contained in:
parent
ddcc204846
commit
87dc9b8ba2
@ -138,7 +138,8 @@ function createWindow() {
|
||||
|
||||
// Watch for a change in macOS's dark mode and reload the window to apply changes
|
||||
systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', () => {
|
||||
mainWindow.webContents.reload();
|
||||
if (mainWindow != null)
|
||||
mainWindow.webContents.reload();
|
||||
})
|
||||
|
||||
// Delete the window when closed
|
||||
|
Loading…
Reference in New Issue
Block a user