mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
fix: tags count not decreasing on untag/uncolor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user