Suppress verbose error in certificateStore
This commit is contained in:
@@ -10,6 +10,7 @@ Release date: TBD
|
|||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
- "Cannot connect to Mattermost" is now on top of the page
|
- "Cannot connect to Mattermost" is now on top of the page
|
||||||
|
- Suppressed verbose error which is related to certificates
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
- Copying a links address and pasting it inside the app now works
|
- Copying a links address and pasting it inside the app now works
|
||||||
|
@@ -26,11 +26,18 @@ function getHost(targetURL) {
|
|||||||
|
|
||||||
var CertificateStore = function(storeFile) {
|
var CertificateStore = function(storeFile) {
|
||||||
this.storeFile = storeFile;
|
this.storeFile = storeFile;
|
||||||
|
let storeStr;
|
||||||
try {
|
try {
|
||||||
this.data = JSON.parse(fs.readFileSync(storeFile, 'utf-8'));
|
storeStr = fs.readFileSync(storeFile, 'utf-8')
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log(e);
|
storeStr = '{}';
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.data = JSON.parse(storeStr);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.log('Error when parsing', storeFile, ':', e);
|
||||||
this.data = {};
|
this.data = {};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user