Skip to content

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

fix: clone tag item before renaming

thecodrr0f976c155f08
diff --git a/packages/core/collections/tags.js b/packages/core/collections/tags.js
index 3469543f2..81ae20746 100644
--- a/packages/core/collections/tags.js
+++ b/packages/core/collections/tags.js
@@ -47,9 +47,7 @@ export default class Tags extends Collection {
return;
}
await this._db.settings.setAlias(tagId, newName);
-
- tag.alias = newName;
- await this._collection.addItem(tag);
+ await this._collection.addItem({ ...tag, alias: newName });
}
alias(tagId) {