about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-11 21:23:03 +0100
committerGitHub <noreply@github.com>2022-11-11 21:23:03 +0100
commit93a6ebc83d4bc6647d1eafce509a29aa3642c87c (patch)
tree1690baedb40817f0fc338d53e607a21d14b65e4f
parent96f51e593f2609579b8155d971bcbc5ab9e7cd4c (diff)
Fix WebUI crash when listing server blocks and rationale is not available (#20408)
Regression from #20391

Fixes #20405
-rw-r--r--app/javascript/mastodon/features/about/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/about/index.js b/app/javascript/mastodon/features/about/index.js
index 15d017642..e59f73738 100644
--- a/app/javascript/mastodon/features/about/index.js
+++ b/app/javascript/mastodon/features/about/index.js
@@ -191,7 +191,7 @@ class About extends React.PureComponent {
                         <span className='about__domain-blocks__domain__type' title={intl.formatMessage(severityMessages[block.get('severity')].explanation)}>{intl.formatMessage(severityMessages[block.get('severity')].title)}</span>
                       </div>
 
-                      <p>{block.get('comment').length > 0 ? block.get('comment') : <FormattedMessage id='about.domain_blocks.no_reason_available' defaultMessage='Reason not available' />}</p>
+                      <p>{(block.get('comment') || '').length > 0 ? block.get('comment') : <FormattedMessage id='about.domain_blocks.no_reason_available' defaultMessage='Reason not available' />}</p>
                     </div>
                   ))}
                 </div>