[MM-21934] don't do anything on cancel (#1168)
This commit is contained in:
12
src/main.js
12
src/main.js
@@ -324,14 +324,14 @@ 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') {
|
console.log('user canceled certificate selection');
|
||||||
callback(); //user cancelled, so we use the callback without certificate.
|
} else {
|
||||||
} else {
|
try {
|
||||||
callback(cert);
|
callback(cert);
|
||||||
|
} catch (e) {
|
||||||
|
console.log(`There was a problem using the selected certificate: ${e}`);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
console.log(`There was a problem using the selected certificate: ${e}`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user