mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
make note cache decryption more robust - one failure will not crash the whole process, #1810
This commit is contained in:
@@ -49,7 +49,12 @@ class Note extends Entity {
|
||||
this.isContentAvailable = protectedSessionService.isProtectedSessionAvailable();
|
||||
|
||||
if (this.isContentAvailable) {
|
||||
this.title = protectedSessionService.decryptString(this.title);
|
||||
try {
|
||||
this.title = protectedSessionService.decryptString(this.title);
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Could not decrypt title of note ${this.noteId}: ${e.message} ${e.stack}`)
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.title = "[protected]";
|
||||
|
||||
Reference in New Issue
Block a user