Skip to content

Commit

Permalink
setProxy: Promisify API usages for Electron v7.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishk98 committed Dec 10, 2019
1 parent ef8d31b commit f90ac04
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/renderer/js/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,17 @@ class ServerManagerView {
pacScript: ConfigUtil.getConfigItem('proxyPAC', ''),
proxyRules: ConfigUtil.getConfigItem('proxyRules', ''),
proxyBypassRules: ConfigUtil.getConfigItem('proxyBypass', '')
}, resolve);
}).then(res => {
resolve();
});
} else {
session.fromPartition('persist:webviewsession').setProxy({
pacScript: '',
proxyRules: '',
proxyBypassRules: ''
}, resolve);
}).then(res => {
resolve();
});
}
});
}
Expand Down

0 comments on commit f90ac04

Please sign in to comment.