mirror of
https://github.com/zadam/trilium.git
synced 2025-09-12 17:48:34 +08:00
fix null content when protecting notes, closes #3523
This commit is contained in:
parent
8eaef3e1d8
commit
2525857c20
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue