A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: tags count not decreasing on untag/uncolor
thecodrr38c1d9ef6673
diff --git a/packages/core/collections/tags.js b/packages/core/collections/tags.jsindex 5a47926a4..2f436b59d 100644--- a/packages/core/collections/tags.js+++ b/packages/core/collections/tags.js@@ -28,10 +28,10 @@ export default class Tags {if (!id || id.trim().length <= 0) return;let tag = this.collection.getItem(id);if (!tag) return;- if (tag.count <= 1) {+ tag.count--;+ if (tag.count === 0) {await this.collection.removeItem(id);} else {- tag.count--;await this.collection.addItem(tag);}}