Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit c5841b6

Browse files
authored
Merge pull request #1826 from OpenBazaar/fix-shell-externallinks
Didn't make a new bundled app, so I couldn't test this. But, the code looks pretty straight-forward.
2 parents 699a28a + 6dd9b9c commit c5841b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/start.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ var Polyglot = require('node-polyglot'),
7373
updatePolyglot,
7474
validateLanguage;
7575

76+
const {shell} = require('electron');
77+
7678
if (process.platform === 'darwin') {
7779
platformClass = 'platform-mac';
7880
} else if (process.platform === 'win32') {
@@ -246,7 +248,7 @@ $('body').on('click', 'a', function(e){
246248
if (!/^https?:\/\//i.test(targUrl)) {
247249
targUrl = 'http://' + targUrl;
248250
}
249-
require("shell").openExternal(targUrl);
251+
shell.openExternal(targUrl);
250252
} else if ($(e.target).closest("a").attr("href") && !targUrl.startsWith('#')){ //internal links should start with #
251253
e.preventDefault(); //just ignore any anchor with an href that is not a valid internal link
252254
}

0 commit comments

Comments
 (0)