web: fix resolved item data misaligned with items

This commit is contained in:
Abdullah Atta
2023-12-14 14:50:18 +05:00
parent 925b97b6f3
commit 444e855e73

View File

@@ -169,8 +169,13 @@ async function resolveNotes(ids: string[]) {
console.timeEnd("resolve");
const data: NoteResolvedData[] = [];
for (const noteId in grouped) {
for (const noteId of ids) {
const group = grouped[noteId];
if (!group) {
data.push({});
continue;
}
data.push({
color: group.color ? resolved.colors[group.color] : undefined,
reminder: group.reminder ? resolved.reminders[group.reminder] : undefined,