Skip to content

Commit

Permalink
fix: showing certificate dialog with no window (#24121)
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed Jun 13, 2020
1 parent 0d80baf commit 496b0f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/browser/api/dialog.js
Expand Up @@ -249,7 +249,11 @@ module.exports = {
},

showCertificateTrustDialog: function (window, options) {
if (window && window.constructor !== BrowserWindow) options = window;
if (window && window.constructor !== BrowserWindow) {
options = window;
window = null;
}

if (options == null || typeof options !== 'object') {
throw new TypeError('options must be an object');
}
Expand Down

0 comments on commit 496b0f8

Please sign in to comment.