diff --git a/src/public/app/services/date_notes.js b/src/public/app/services/date_notes.js index 57884811f..297afb5d5 100644 --- a/src/public/app/services/date_notes.js +++ b/src/public/app/services/date_notes.js @@ -18,6 +18,8 @@ async function getTodayNote() { async function getDateNote(date) { const note = await server.get('date-notes/date/' + date, "date-note"); + await ws.waitForMaxKnownEntityChangeId(); + return await treeCache.getNote(note.noteId); } @@ -25,6 +27,8 @@ async function getDateNote(date) { async function getMonthNote(month) { const note = await server.get('date-notes/month/' + month, "date-note"); + await ws.waitForMaxKnownEntityChangeId(); + return await treeCache.getNote(note.noteId); } @@ -32,6 +36,8 @@ async function getMonthNote(month) { async function getYearNote(year) { const note = await server.get('date-notes/year/' + year, "date-note"); + await ws.waitForMaxKnownEntityChangeId(); + return await treeCache.getNote(note.noteId); } @@ -39,6 +45,8 @@ async function getYearNote(year) { async function createSqlConsole() { const note = await server.post('sql-console'); + await ws.waitForMaxKnownEntityChangeId(); + return await treeCache.getNote(note.noteId); }