diff --git a/apps/client/src/services/attributes.ts b/apps/client/src/services/attributes.ts index 13f440c3c..694eb1b02 100644 --- a/apps/client/src/services/attributes.ts +++ b/apps/client/src/services/attributes.ts @@ -70,8 +70,8 @@ function removeOwnedLabelByName(note: FNote, labelName: string) { */ function removeOwnedRelationByName(note: FNote, relationName: string) { const relation = note.getOwnedRelation(relationName); - if (label) { - removeAttributeById(note.noteId, label.attributeId); + if (relation) { + removeAttributeById(note.noteId, relation.attributeId); return true; } return false;