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 and audiodude committed Oct 23, 2023
1 parent 5f07c9f commit 0800029
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/javascript/mastodon/features/about/index.jsx
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 0800029

Please sign in to comment.