Skip to content

Commit

Permalink
[DSC-2059] Fix problem when authority is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Nov 28, 2024
1 parent aeabfb1 commit ddbd43a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { RenderingTypeValueModelComponent } from '../rendering-type-value.model'
import { Item } from '../../../../../../../core/shared/item.model';
import { LayoutField } from '../../../../../../../core/layout/models/box.model';
import { MetadataValue } from '../../../../../../../core/shared/metadata.models';
import { isEmpty } from '../../../../../../../shared/empty.util';

/**
* This component renders the links metadata fields.
Expand Down Expand Up @@ -56,8 +57,11 @@ export class LinkAuthorityComponent extends RenderingTypeValueModelComponent imp
}

getWebsiteIcon(): string {
const siteUrl = this.metadataValue.authority;
let iconStyle = '';
const siteUrl = this.metadataValue.authority;
if (isEmpty(siteUrl)) {
return iconStyle;
}

if (siteUrl.includes('linkedin')) {
iconStyle = 'fab fa-linkedin';
Expand Down

0 comments on commit ddbd43a

Please sign in to comment.