Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix null content when protecting notes, closes #3523
zadam2525857c2062
diff --git a/src/services/notes.js b/src/services/notes.jsindex 813e75bc64..c361b05425 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -286,8 +286,10 @@ function protectNote(note, protect) {note.isProtected = protect;- // this will force de/encryption- note.setContent(content);+ if (content !== null) { // see https://github.com/zadam/trilium/issues/3523+ // this will force de/encryption+ note.setContent(content);+ }note.save();}