chore(react/ribbon): handle search error

This commit is contained in:
Elian Doran
2025-08-24 16:41:44 +03:00
parent e1fa188244
commit b9193a5562
5 changed files with 46 additions and 48 deletions

View File

@@ -61,7 +61,7 @@ function removeOwnedLabelByName(note: FNote, labelName: string) {
* @param value the value of the attribute to set.
*/
export async function setAttribute(note: FNote, type: "label" | "relation", name: string, value: string | null | undefined) {
if (value) {
if (value !== null && value !== undefined) {
// Create or update the attribute.
await server.put(`notes/${note.noteId}/set-attribute`, { type, name, value });
} else {