Update OpenSteamLinksInApp.plugin.js

This commit is contained in:
Mirco Wittrien 2021-08-06 18:19:35 +02:00 committed by GitHub
parent 7e4e58c01d
commit bb30e32fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -95,10 +95,11 @@ module.exports = (_ => {
openInSteam (url) {
BDFDB.LibraryRequires.request(url, (error, response, body) => {
if (BDFDB.LibraryRequires.electron.shell.openExternal("steam://openurl/" + response.request.href));
if (error) return;
else if (BDFDB.LibraryRequires.electron.shell.openExternal("steam://openurl/" + response.request.href));
else BDFDB.DiscordUtils.openLink(response.request.href);
});
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();
})();