Skip to content

Commit

Permalink
fix: handle missing value
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Jun 27, 2024
1 parent 4200663 commit cabdb31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/SiteProperty/SiteProperty.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ const SiteProperty = ({

switch (property) {
case 'site_title':
if (value.constructor === Object) {
if (value && value.constructor === Object) {
value = value[currentLang] || value.default;
}
if (hasSubsite && !getParent) {
value = subsite?.title ?? value;
}
break;
case 'site_subtitle':
if (value.constructor === Object) {
if (value && value.constructor === Object) {
value = value[currentLang] || '';
}
if (hasSubsite && !getParent) {
Expand Down

0 comments on commit cabdb31

Please sign in to comment.