This commit is contained in:
baiyongjie 2023-05-26 14:54:13 +08:00
parent 6098d62dcc
commit 9d49264258

View File

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