Skip to content

Build your personal knowledge base with Trilium Notes

fix getEditedNotesOnDate

baiyongjie6098d62dcc90
diff --git a/src/routes/api/note_revisions.js b/src/routes/api/note_revisions.js
index f28239f2e9..e3e8bbf88f 100644
--- a/src/routes/api/note_revisions.js
+++ b/src/routes/api/note_revisions.js
@@ -132,15 +132,17 @@ function getEditedNotesOnDate(req) {
notes = notes.filter(note => note.hasAncestor(hoistedNoteId));
}
- notes = notes.map(note => note.getPojo());
+ const notePojos = notes.map(note => note.getPojo());
- for (const note of notes) {
+ notes.forEach((note, index) => {
const notePath = note.isDeleted ? null : getNotePathData(note);
- note.notePath = notePath ? notePath.notePath : null;
- }
+ notePojos[index].notePath = notePath ? notePath.notePath : null;
+ });
+
+
- return notes;
+ return notePojos;
}
function getNotePathData(note) {