Skip to content

Commit

Permalink
fix: invalid title error (#6280)
Browse files Browse the repository at this point in the history
  • Loading branch information
abretonc7s authored Apr 27, 2023
1 parent 70639c4 commit 96759c5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/components/UI/WebsiteIcon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ export default class WebsiteIcon extends PureComponent {
const colors = this.context.colors || mockTheme.colors;
const styles = createStyles(colors);
const apiLogoUrl = { uri: icon || this.getIconUrl(url) };
const title =
typeof this.props.title === 'string'
? this.props.title.substr(0, 1)
: getHost(url).substr(0, 1);
let title = this.props.title;

if (title !== undefined) {
title =
typeof this.props.title === 'string'
? this.props.title.substr(0, 1)
: getHost(url).substr(0, 1);
}

if (renderIconUrlError && title) {
return (
Expand Down

0 comments on commit 96759c5

Please sign in to comment.