Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit cd5b21c

Browse files
committed
fix(packages/core): broken open external link support
Fixes #4197
1 parent e8ffcab commit cd5b21c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/main/spawn-electron.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export function createWindow(
220220
mainWindow.webContents.on(
221221
'new-window',
222222
// eslint-disable-next-line @typescript-eslint/no-explicit-any
223-
(event: Event, url: string, frameName: string, disposition: string, options: any) => {
223+
async (event: Event, url: string, frameName: string, disposition: string, options: any) => {
224224
if (url.startsWith('https://youtu.be')) {
225225
// special handling of youtube links
226226
openFixedWindow({
@@ -232,7 +232,7 @@ export function createWindow(
232232
})
233233
} else {
234234
event.preventDefault()
235-
Electron.shell.openExternal(url)
235+
;(await import('electron')).shell.openExternal(url)
236236
}
237237
}
238238
)

0 commit comments

Comments
 (0)