Skip to content

Commit

Permalink
Fix error in Web UI when server rules cannot be fetched (mastodon#26957)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Sep 18, 2023
1 parent 392c07f commit 893755f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/mastodon/features/about/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import { Helmet } from 'react-helmet';

import { List as ImmutableList } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';

Expand Down Expand Up @@ -161,7 +162,7 @@ class About extends PureComponent {
</Section>

<Section title={intl.formatMessage(messages.rules)}>
{!isLoading && (server.get('rules', []).isEmpty() ? (
{!isLoading && (server.get('rules', ImmutableList()).isEmpty() ? (
<p><FormattedMessage id='about.not_available' defaultMessage='This information has not been made available on this server.' /></p>
) : (
<ol className='rules-list'>
Expand Down

0 comments on commit 893755f

Please sign in to comment.