From d0c655f66a32e15b32aca1a4bf5f87a001b785db Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 3 Jan 2020 08:55:13 +0100 Subject: [PATCH] fix removeAttribute to take into account attribute name, closes #804 --- src/entities/note.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entities/note.js b/src/entities/note.js index 20ce506b2..6eb87c5b2 100644 --- a/src/entities/note.js +++ b/src/entities/note.js @@ -525,7 +525,7 @@ class Note extends Entity { const attributes = await this.loadOwnedAttributesToCache(); for (const attribute of attributes) { - if (attribute.type === type && (value === undefined || value === attribute.value)) { + if (attribute.type === type && attribute.name === name && (value === undefined || value === attribute.value)) { attribute.isDeleted = true; await attribute.save();