Skip to content

Build your personal knowledge base with Trilium Notes

chore(client): fix typecheck issue

Elian Doran9e34d3a668aa
diff --git a/apps/client/src/services/attributes.ts b/apps/client/src/services/attributes.ts
index 13f440c3cf..694eb1b02a 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;