diff --git a/packages/core/collections/tags.js b/packages/core/collections/tags.js index 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); } }