From 088ee2a8617dd55608dc75d143571030e8def86c Mon Sep 17 00:00:00 2001 From: Jonathan Belcher Date: Wed, 7 Aug 2019 16:12:56 -0400 Subject: [PATCH] Fix error caused by null value --- desktop/app.js | 2 +- lib/dialogs/settings/panels/display.jsx | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/desktop/app.js b/desktop/app.js index 82906e42c..4e3b3e6b2 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -110,7 +110,7 @@ module.exports = function main() { }); ipcMain.on('setAutoHideMenuBar', function(event, autoHideMenuBar) { - mainWindow.setAutoHideMenuBar(autoHideMenuBar); + mainWindow.setAutoHideMenuBar(autoHideMenuBar || false); mainWindow.setMenuBarVisibility(!autoHideMenuBar); }); diff --git a/lib/dialogs/settings/panels/display.jsx b/lib/dialogs/settings/panels/display.jsx index dc98aa4b4..7786abbdb 100644 --- a/lib/dialogs/settings/panels/display.jsx +++ b/lib/dialogs/settings/panels/display.jsx @@ -109,19 +109,18 @@ const DisplayPanel = props => { - {isElectron && - !isMacApp && ( - - - - )} + {isElectron && !isMacApp && ( + + + + )} ); };