Merge pull request #3974 from soulsands/fix-edited-note

fix getEditedNotesOnDate
This commit is contained in:
zadam 2023-05-26 11:05:57 +02:00 committed by GitHub
commit ef89eede17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,15 +132,15 @@ function getEditedNotesOnDate(req) {
notes = notes.filter(note => note.hasAncestor(hoistedNoteId));
}
notes = notes.map(note => note.getPojo());
for (const note of notes) {
return notes.map(note => {
const notePath = note.isDeleted ? null : getNotePathData(note);
note.notePath = notePath ? notePath.notePath : null;
}
const notePojo = note.getPojo();
notePojo.notePath = notePath ? notePath.notePath : null;
return notePojo;
});
return notes;
}
function getNotePathData(note) {