better error handling for search notes

This commit is contained in:
zadam
2020-01-13 19:35:06 +01:00
parent a79a063d17
commit 20fdeee048
3 changed files with 25 additions and 7 deletions

View File

@@ -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);
}