mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-25 08:51:35 +08:00 
			
		
		
		
	fix saving JSON note with invalid JSON (previously in such a case content was not updated), fixes #307
This commit is contained in:
		
							parent
							
								
									4b977a3306
								
							
						
					
					
						commit
						0722494d41
					
				| @ -56,6 +56,9 @@ class Note extends Entity { | ||||
|     setContent(content) { | ||||
|         this.content = content; | ||||
| 
 | ||||
|         // if parsing below is not successful then there's no jsonContent as opposed to still having the old unupdated ones
 | ||||
|         delete this.jsonContent; | ||||
| 
 | ||||
|         try { | ||||
|             this.jsonContent = JSON.parse(this.content); | ||||
|         } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner