fix: showing certificate dialog with no window (#24091)

This commit is contained in:
Shelley Vohr 2020-06-12 22:18:09 -07:00 committed by GitHub
parent 379bb174e9
commit b9ac334efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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');
}