diff --git a/src/Application.ts b/src/Application.ts index ab58926..fccab27 100644 --- a/src/Application.ts +++ b/src/Application.ts @@ -76,6 +76,8 @@ export default class Application { if (contents.getType() === 'webview') { console.log('Setting external links to open in default OS browser'); contents.setWindowOpenHandler(details => { + if (details.url.startsWith(details.referrer.url)) return {action: 'allow'}; + const url = details.url; this.openExternalLink(url) .catch(console.error);