[MM-23153] Fixed the issue where back/forward navigation not in the main window causes the app to crash (#1248)

* [MM-23153] Force the back/forward buttons to only work with the main window

* Revert "[MM-23153] Force the back/forward buttons to only work with the main window"

This reverts commit 9db159dbb9c6b08887492f44f5d1a7bd0df55517.

* Just fix the bug
This commit is contained in:
Devin Binnie 2020-04-01 14:08:00 -04:00 committed by GitHub
parent 3d188030a4
commit 4f104c93c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,7 +214,7 @@ function createTemplate(mainWindow, config, isDev) {
if (focusedWindow === mainWindow) {
mainWindow.webContents.send('go-back');
} else if (focusedWindow.webContents.canGoBack()) {
focusedWindow.goBack();
focusedWindow.webContents.goBack();
}
},
}, {
@ -224,7 +224,7 @@ function createTemplate(mainWindow, config, isDev) {
if (focusedWindow === mainWindow) {
mainWindow.webContents.send('go-forward');
} else if (focusedWindow.webContents.canGoForward()) {
focusedWindow.goForward();
focusedWindow.webContents.goForward();
}
},
}],