Skip to content

Commit 2737c86

Browse files
committed
🐛 ♻️ Fix empty relation name
1 parent 234ac57 commit 2737c86

File tree

1 file changed

+5
-1
lines changed
  • src/react-chayns-personfinder/component/result-item

1 file changed

+5
-1
lines changed

src/react-chayns-personfinder/component/result-item/Relation.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ function getRelations(data, type) {
2222

2323
for (let i = 0; i < show; i += 1) {
2424
if (type === PERSON_RELATION || type === PERSON_UNRELATED || type === FRIEND_RELATION) {
25-
relationString += data[i].type === 'LIVING_IN' ? `${getText(data[i].type, data[i].name)}, ` : `${data[i].name}, `;
25+
if (data[i].type === 'LIVING_IN') {
26+
relationString += `${getText(data[i].type, data[i].name)}, `;
27+
} else if (data[i].name) {
28+
relationString += `${data[i].name}, `;
29+
}
2630
} else {
2731
relationString += `${getText(data[i].type)}, `;
2832
}

0 commit comments

Comments
 (0)