mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
fix null content when protecting notes, closes #3523
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user