Skip to content

Commit c77c902

Browse files
fix: showing certificate dialog with no window (electron#24119)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent cbaaf6a commit c77c902

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
@@ -227,7 +227,11 @@ module.exports = {
227227
},
228228

229229
showCertificateTrustDialog: function (window, options) {
230-
if (window && window.constructor !== BrowserWindow) options = window;
230+
if (window && window.constructor !== BrowserWindow) {
231+
options = window;
232+
window = null;
233+
}
234+
231235
if (options == null || typeof options !== 'object') {
232236
throw new TypeError('options must be an object');
233237
}

0 commit comments

Comments
 (0)