Skip to content

Commit e96d3cd

Browse files
Fixed DSONameService getName & getHitHighlights returning empty string for OrgUnits without organization.legalName field
1 parent 9a5ad0b commit e96d3cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/core/breadcrumbs/dso-name.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class DSONameService {
5050
}
5151
},
5252
OrgUnit: (dso: DSpaceObject): string => {
53-
return dso.firstMetadataValue('organization.legalName');
53+
return dso.firstMetadataValue('organization.legalName') || this.translateService.instant('dso.name.untitled');
5454
},
5555
Default: (dso: DSpaceObject): string => {
5656
// If object doesn't have dc.title metadata use name property
@@ -106,7 +106,7 @@ export class DSONameService {
106106
}
107107
return `${familyName}, ${givenName}`;
108108
} else if (entityType === 'OrgUnit') {
109-
return this.firstMetadataValue(object, dso, 'organization.legalName');
109+
return this.firstMetadataValue(object, dso, 'organization.legalName') || this.translateService.instant('dso.name.untitled');
110110
}
111111
return this.firstMetadataValue(object, dso, 'dc.title') || dso.name || this.translateService.instant('dso.name.untitled');
112112
}

0 commit comments

Comments
 (0)