Skip to content

Commit

Permalink
Add fallback option for node-license license link (#1957)
Browse files Browse the repository at this point in the history
  • Loading branch information
futa-ikeda authored Aug 23, 2023
1 parent 8ce7972 commit cea1f72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/search-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ export default class SearchResultModel extends Model {
if (this.resourceMetadata.isContainedBy?.[0]?.rights) {
return {
name: this.resourceMetadata.isContainedBy[0].rights?.[0]?.name?.[0]?.['@value'],
identifier: this.resourceMetadata.rights?.[0]?.['@id'],
identifier: this.resourceMetadata.rights?.[0]?.['@id'] ||
this.resourceMetadata.isContainedBy[0].rights[0]?.['@id'],
};
}
return null;
Expand Down

0 comments on commit cea1f72

Please sign in to comment.