mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-02-03 10:47:32 +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
|
// Watch for a change in macOS's dark mode and reload the window to apply changes
|
||||||
systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', () => {
|
systemPreferences.subscribeNotification('AppleInterfaceThemeChangedNotification', () => {
|
||||||
mainWindow.webContents.reload();
|
if (mainWindow != null)
|
||||||
|
mainWindow.webContents.reload();
|
||||||
})
|
})
|
||||||
|
|
||||||
// Delete the window when closed
|
// Delete the window when closed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user