mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	smaller refactorings continued
This commit is contained in:
		| @@ -131,6 +131,10 @@ class Note extends Entity { | ||||
|     } | ||||
|  | ||||
|     beforeSaving() { | ||||
|         if (!this.noteId) { | ||||
|             this.noteId = utils.newNoteId(); | ||||
|         } | ||||
|  | ||||
|         if (this.isJson()) { | ||||
|             this.content = JSON.stringify(this.jsonContent, null, '\t'); | ||||
|         } | ||||
| @@ -139,6 +143,10 @@ class Note extends Entity { | ||||
|             protected_session.encryptNote(this); | ||||
|         } | ||||
|  | ||||
|         if (!this.isDeleted) { | ||||
|             this.isDeleted = false; | ||||
|         } | ||||
|  | ||||
|         if (!this.dateCreated) { | ||||
|             this.dateCreated = utils.nowDate(); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user