mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +01:00
smaller refactorings continued
This commit is contained in:
@@ -17,6 +17,14 @@ class NoteImage extends Entity {
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.noteImageId) {
|
||||
this.noteImageId = utils.newNoteImageId();
|
||||
}
|
||||
|
||||
if (!this.isDeleted) {
|
||||
this.isDeleted = false;
|
||||
}
|
||||
|
||||
if (!this.dateCreated) {
|
||||
this.dateCreated = utils.nowDate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user