Skip to content

Commit 514c1e6

Browse files
fix: showing certificate dialog with no window (electron#24120)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 67b04b4 commit 514c1e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/browser/api/dialog.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,11 @@ module.exports = {
249249
},
250250

251251
showCertificateTrustDialog: function (window, options) {
252-
if (window && window.constructor !== BrowserWindow) options = window;
252+
if (window && window.constructor !== BrowserWindow) {
253+
options = window;
254+
window = null;
255+
}
256+
253257
if (options == null || typeof options !== 'object') {
254258
throw new TypeError('options must be an object');
255259
}

0 commit comments

Comments
 (0)