Skip to content

Build your personal knowledge base with Trilium Notes

chore(server): address requested changes

Elian Doranc03f50583e7b
diff --git a/apps/client/src/widgets/PromotedAttributes.tsx b/apps/client/src/widgets/PromotedAttributes.tsx
index f40307a900..1e0bdeb474 100644
--- a/apps/client/src/widgets/PromotedAttributes.tsx
+++ b/apps/client/src/widgets/PromotedAttributes.tsx
@@ -465,6 +465,7 @@ function useTextLabelAutocomplete(inputId: string, valueAttr: Attribute, definit
}
async function updateAttribute(note: FNote, cell: Cell, componentId: string, value: string | undefined, setCells: Dispatch<StateUpdater<Cell[] | undefined>>) {
+ if (value === cell.valueAttr.value) return;
const { attributeId } = await server.put<UpdateAttributeResponse>(
`notes/${note.noteId}/attribute`,
{
diff --git a/apps/server/src/routes/api/special_notes.ts b/apps/server/src/routes/api/special_notes.ts
index 8478ccad73..aa3e9b6561 100644
--- a/apps/server/src/routes/api/special_notes.ts
+++ b/apps/server/src/routes/api/special_notes.ts
@@ -12,7 +12,7 @@ function getInboxNote(req: Request) {
function getDayNote(req: Request) {
const calendarRootId = req.query.calendarRootId;
- const calendarRoot = calendarRootId ? becca.getNoteOrThrow(String(calendarRootId)) : null;
+ const calendarRoot = typeof calendarRootId === "string" ? becca.getNoteOrThrow(calendarRootId) : null;
return dateNoteService.getDayNote(req.params.date, calendarRoot);
}