ELECTRON-1408: fix toggle dev tools menu item (#737)

- Destructure the config object correctly to get the devToolsEnabled config value in app menu component
This commit is contained in:
Vishwas Shashidhar
2019-07-17 23:57:41 +05:30
committed by GitHub
parent 54994590b5
commit e5d86dc6d7

View File

@@ -385,7 +385,7 @@ export class AppMenu {
label: i18n.t('Toggle Developer Tools')(),
accelerator: isMac ? 'Alt+Command+I' : 'Ctrl+Shift+I',
click(_item, focusedWindow) {
const devToolsEnabled = config.getGlobalConfigFields([ 'devToolsEnabled' ]);
const { devToolsEnabled } = config.getGlobalConfigFields([ 'devToolsEnabled' ]);
if (!focusedWindow || !windowExists(focusedWindow)) {
return;
}