Skip to content

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

fix: tag alias gets reset on note addition

thecodrrdddb78f23813
diff --git a/packages/core/collections/tags.js b/packages/core/collections/tags.js
index ea3d6714f..35bc90e71 100644
--- a/packages/core/collections/tags.js
+++ b/packages/core/collections/tags.js
@@ -30,7 +30,8 @@ export default class Tags extends Collection {
};
await this._collection.addItem(tag);
- await this._db.settings.setAlias(tag.id, tag.title);
+ if (!this._db.settings.getAlias(tag.id))
+ await this._db.settings.setAlias(tag.id, tag.title);
return tag;
}