mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix JSON saving bug
This commit is contained in:
		| @@ -21,6 +21,14 @@ class Note extends Entity { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     setContent(content) { | ||||
|         this.content = content; | ||||
|  | ||||
|         if (this.isJson()) { | ||||
|             this.jsonContent = JSON.parse(this.content); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     isJson() { | ||||
|         return this.mime === "application/json"; | ||||
|     } | ||||
|   | ||||
| @@ -198,7 +198,7 @@ async function updateNote(noteId, noteUpdates) { | ||||
|     await saveNoteRevision(note); | ||||
|  | ||||
|     note.title = noteUpdates.title; | ||||
|     note.content = noteUpdates.content; | ||||
|     note.setContent(noteUpdates.content); | ||||
|     note.isProtected = noteUpdates.isProtected; | ||||
|     await note.save(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user