1
0
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:
Marquis Kurt 2019-05-17 11:47:22 -04:00
parent ddcc204846
commit 87dc9b8ba2

View File

@ -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