mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 12:12:14 +00:00
Fix error in Web UI when server rules cannot be fetched (#26957)
This commit is contained in:
parent
392c07f2bf
commit
893755f4cb
|
@ -6,6 +6,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
|
import { List as ImmutableList } from 'immutable';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
@ -161,7 +162,7 @@ class About extends PureComponent {
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section title={intl.formatMessage(messages.rules)}>
|
<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>
|
<p><FormattedMessage id='about.not_available' defaultMessage='This information has not been made available on this server.' /></p>
|
||||||
) : (
|
) : (
|
||||||
<ol className='rules-list'>
|
<ol className='rules-list'>
|
||||||
|
|
Loading…
Reference in a new issue