diff options
author | 2023-04-28 00:38:30 +0100 | |
---|---|---|
committer | 2023-04-28 06:24:01 +0530 | |
commit | b4724e034e2e3f88e6625ead891162cc8a776367 (patch) | |
tree | afd57bcb37430481eb63fd33d74e226a1c05658a /src/lib/Menu.ts | |
parent | 6.2.7-nightly.8 [skip ci] (diff) | |
download | ferdium-app-b4724e034e2e3f88e6625ead891162cc8a776367.tar.gz ferdium-app-b4724e034e2e3f88e6625ead891162cc8a776367.tar.zst ferdium-app-b4724e034e2e3f88e6625ead891162cc8a776367.zip |
Update electron
Diffstat (limited to 'src/lib/Menu.ts')
-rw-r--r-- | src/lib/Menu.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/Menu.ts b/src/lib/Menu.ts index 5356ec2c6..b1510cec3 100644 --- a/src/lib/Menu.ts +++ b/src/lib/Menu.ts | |||
@@ -736,15 +736,18 @@ class FranzMenu implements StoresProps { | |||
736 | { | 736 | { |
737 | label: intl.formatMessage(menuItems.toggleDevTools), | 737 | label: intl.formatMessage(menuItems.toggleDevTools), |
738 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, | 738 | accelerator: `${cmdOrCtrlShortcutKey()}+${altKey()}+I`, |
739 | enabled: webContents.fromId(1) !== undefined, | ||
739 | click: () => { | 740 | click: () => { |
740 | const windowWebContents = webContents.fromId(1); | 741 | const windowWebContents = webContents.fromId(1); |
741 | const { isDevToolsOpened, openDevTools, closeDevTools } = | 742 | if (windowWebContents) { |
742 | windowWebContents; | 743 | const { isDevToolsOpened, openDevTools, closeDevTools } = |
744 | windowWebContents; | ||
743 | 745 | ||
744 | if (isDevToolsOpened()) { | 746 | if (isDevToolsOpened()) { |
745 | closeDevTools(); | 747 | closeDevTools(); |
746 | } else { | 748 | } else { |
747 | openDevTools({ mode: 'right' }); | 749 | openDevTools({ mode: 'right' }); |
750 | } | ||
748 | } | 751 | } |
749 | }, | 752 | }, |
750 | }, | 753 | }, |