mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +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;
 | 
			
		||||
 | 
			
		||||
            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