From 357d872362ba306fdc9728ed552c1290d23d2f69 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Wed, 20 Mar 2024 07:24:29 +0500 Subject: [PATCH] web: fix assigning a color removes that color from all other notes --- apps/web/src/stores/note-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/stores/note-store.ts b/apps/web/src/stores/note-store.ts index 4fbb92a74..4498417d1 100644 --- a/apps/web/src/stores/note-store.ts +++ b/apps/web/src/stores/note-store.ts @@ -111,7 +111,7 @@ class NoteStore extends BaseStore { }; setColor = async (colorId: string, isChecked: boolean, ...ids: string[]) => { - await db.relations.from({ type: "color", id: colorId }, "note").unlink(); + await db.relations.to({ type: "note", ids }, "color").unlink(); if (!isChecked) { for (const id of ids) { await db.relations.add(