We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f367e9f commit 051ce9eCopy full SHA for 051ce9e
browser/components/MarkdownPreview.js
@@ -1135,7 +1135,17 @@ export default class MarkdownPreview extends React.Component {
1135
}
1136
1137
// other case
1138
- shell.openExternal(href)
+ this.openExternal(href)
1139
+ }
1140
+
1141
+ openExternal (href) {
1142
+ try {
1143
+ const success = shell.openExternal(href) || shell.openExternal(decodeURI(href))
1144
+ if (!success) console.error('failed to open url ' + href)
1145
+ } catch (e) {
1146
+ // URI Error threw from decodeURI
1147
+ console.error(e)
1148
1149
1150
1151
render () {
0 commit comments