Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: compare tags & colors with title as well

thecodrr5d6f8e6712a0
diff --git a/packages/core/collections/tags.js b/packages/core/collections/tags.js
index 729042db2..360ca8fd9 100644
--- a/packages/core/collections/tags.js
+++ b/packages/core/collections/tags.js
@@ -16,7 +16,9 @@ export default class Tags extends Collection {
await this._collection.addItem(tag);
return;
}
- const oldTag = this.all.find((t) => t.id === tag.id);
+ const oldTag = this.all.find(
+ (t) => t.id === tag.id || t.title === tag.title
+ );
if (!oldTag) return await this._collection.addItem(tag);
const deletedIds = set.union(oldTag.deletedIds, tag.deletedIds);