[MM-21934] don't do anything on cancel (#1168)

This commit is contained in:
Guillermo Vayá
2020-01-27 10:22:30 +01:00
committed by GitHub
parent 81555eafba
commit e247b5c155

View File

@@ -324,16 +324,16 @@ function handleSelectedCertificate(event, server, cert) {
console.error(`there was no callback associated with: ${server}`); console.error(`there was no callback associated with: ${server}`);
return; return;
} }
try {
if (typeof cert === 'undefined') { if (typeof cert === 'undefined') {
callback(); //user cancelled, so we use the callback without certificate. console.log('user canceled certificate selection');
} else { } else {
try {
callback(cert); callback(cert);
}
} catch (e) { } catch (e) {
console.log(`There was a problem using the selected certificate: ${e}`); console.log(`There was a problem using the selected certificate: ${e}`);
} }
} }
}
function handleAppCertificateError(event, webContents, url, error, certificate, callback) { function handleAppCertificateError(event, webContents, url, error, certificate, callback) {
if (certificateStore.isTrusted(url, certificate)) { if (certificateStore.isTrusted(url, certificate)) {