Skip to content

Commit

Permalink
Fix error caused by null value
Browse files Browse the repository at this point in the history
  • Loading branch information
belcherj committed Aug 7, 2019
1 parent 486f04f commit 088ee2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion desktop/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = function main() {
});

ipcMain.on('setAutoHideMenuBar', function(event, autoHideMenuBar) {
mainWindow.setAutoHideMenuBar(autoHideMenuBar);
mainWindow.setAutoHideMenuBar(autoHideMenuBar || false);
mainWindow.setMenuBarVisibility(!autoHideMenuBar);
});

Expand Down
25 changes: 12 additions & 13 deletions lib/dialogs/settings/panels/display.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,18 @@ const DisplayPanel = props => {
<Item title="Dark" slug="dark" />
</SettingsGroup>

{isElectron &&
!isMacApp && (
<SettingsGroup
title="Menu Bar"
slug="autoHideMenuBar"
activeSlug={autoHideMenuBar ? 'autoHide' : ''}
description="When set to auto-hide, press the Alt key to toggle."
onChange={actions.toggleAutoHideMenuBar}
renderer={ToggleGroup}
>
<Item title="Hide Automatically" slug="autoHide" />
</SettingsGroup>
)}
{isElectron && !isMacApp && (
<SettingsGroup
title="Menu Bar"
slug="autoHideMenuBar"
activeSlug={autoHideMenuBar ? 'autoHide' : ''}
description="When set to auto-hide, press the Alt key to toggle."
onChange={actions.toggleAutoHideMenuBar}
renderer={ToggleGroup}
>
<Item title="Hide Automatically" slug="autoHide" />
</SettingsGroup>
)}
</Fragment>
);
};
Expand Down

0 comments on commit 088ee2a

Please sign in to comment.