Fix error while server rules are loading in report modal in web UI (#19385)
This commit is contained in:
parent
3702afec9f
commit
8a1d10cb35
|
@ -5,6 +5,7 @@ import { connect } from 'react-redux';
|
||||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||||
import Button from 'mastodon/components/button';
|
import Button from 'mastodon/components/button';
|
||||||
import Option from './components/option';
|
import Option from './components/option';
|
||||||
|
import { List as ImmutableList } from 'immutable';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
dislike: { id: 'report.reasons.dislike', defaultMessage: 'I don\'t like it' },
|
dislike: { id: 'report.reasons.dislike', defaultMessage: 'I don\'t like it' },
|
||||||
|
@ -20,7 +21,7 @@ const messages = defineMessages({
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
rules: state.getIn(['server', 'rules']),
|
rules: state.getIn(['server', 'rules'], ImmutableList()),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default @connect(mapStateToProps)
|
export default @connect(mapStateToProps)
|
||||||
|
|
Loading…
Reference in a new issue