mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
better error handling for search notes
This commit is contained in:
@@ -110,6 +110,10 @@ class Note extends Entity {
|
||||
async getJsonContent() {
|
||||
const content = await this.getContent();
|
||||
|
||||
if (!content || !content.trim()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return JSON.parse(content);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user