Skip to content

Commit

Permalink
continue fix bugs related to electron env function
Browse files Browse the repository at this point in the history
  • Loading branch information
listen1 committed Dec 28, 2020
1 parent 0ef8521 commit 32e8888
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ const main = () => {
},
link(scope, element, attrs) {
element.bind('click', (event) => {
if ((typeof chrome) === 'undefined') {
if (isElectron()) {
var shell = require('electron').shell;
shell.openExternal(scope.url);
}
Expand Down
2 changes: 1 addition & 1 deletion js/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ngGithub.factory('github', ['$rootScope',
$rootScope => ({
openAuthUrl: () => {
const url = Github.getOAuthUrl();
if ((typeof chrome) === 'undefined') {
if (isElectron()) {
// normal window for link
const { BrowserWindow } = require('electron').remote; // eslint-disable-line import/no-unresolved
let win = new BrowserWindow({
Expand Down

0 comments on commit 32e8888

Please sign in to comment.