fix: deprecation warnings in Electron code (#20793)

This commit is contained in:
Milan Burda 2019-10-29 05:16:10 +01:00 committed by Cheng Zhao
parent bd5a5b3ae6
commit 0c870775c4
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ BrowserWindow.prototype._init = function () {
// Hide the auto-hide menu when webContents is focused.
this.webContents.on('activate', () => {
if (process.platform !== 'darwin' && this.isMenuBarAutoHide() && this.isMenuBarVisible()) {
if (process.platform !== 'darwin' && this.autoHideMenuBar && this.isMenuBarVisible()) {
this.setMenuBarVisibility(false)
}
})