Skip to content

Commit 28ce37b

Browse files
committed
Fix external links broken by ESM changes
1 parent 61dc8a5 commit 28ce37b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/menu.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as path from 'path';
2-
import { app, Menu, MenuItemConstructorOptions } from 'electron';
2+
import { app, Menu, MenuItemConstructorOptions, shell } from 'electron';
33
import ElectronStore from 'electron-store';
44

55
const store = new ElectronStore();
@@ -55,15 +55,15 @@ export const getMenu = (
5555
submenu: [
5656
{
5757
label: 'Open Documentation',
58-
click () { require('electron').shell.openExternal('https://httptoolkit.com/docs') }
58+
click () { shell.openExternal('https://httptoolkit.com/docs') }
5959
},
6060
{
6161
label: 'Share Your Feedback',
62-
click () { require('electron').shell.openExternal('https://github.com/httptoolkit/httptoolkit/issues/new/choose') }
62+
click () { shell.openExternal('https://github.com/httptoolkit/httptoolkit/issues/new/choose') }
6363
},
6464
{
6565
label: 'View HTTP Toolkit Logs',
66-
click () { require('electron').shell.showItemInFolder(path.join(app.getPath('logs'), 'last-run.log')) }
66+
click () { shell.showItemInFolder(path.join(app.getPath('logs'), 'last-run.log')) }
6767
}
6868
]
6969
}

0 commit comments

Comments
 (0)