Skip to content

Commit

Permalink
FIX: Client side error when settings.icons or settings.links is null
Browse files Browse the repository at this point in the history
I'm not quite sure how `settings.icons` or `settings.links` can somehow
be `null` but we are seeing this problem in production so pushing out a
fix first.
  • Loading branch information
tgxworld committed Apr 24, 2024
1 parent f98789d commit 113ed5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascripts/discourse/components/brand-header-contents.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export default class BrandHeaderContents extends Component {
}

get hasIcons() {
return settings.icons.length > 0;
return settings.icons && settings.icons.length > 0;
}

get hasLinks() {
return settings.links.length > 0;
return settings.links && settings.links.length > 0;
}

<template>
Expand Down

0 comments on commit 113ed5f

Please sign in to comment.