about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-18 18:57:01 +0200
committerGitHub <noreply@github.com>2022-10-18 18:57:01 +0200
commit8a1d10cb35bdd89c2c950aa65cbdca737ac763fc (patch)
tree23c0792f3fda8fe8c058ba52168b035cefa5fadc
parent3702afec9f0a0009297baab5636000fa3a5b7789 (diff)
Fix error while server rules are loading in report modal in web UI (#19385)
-rw-r--r--app/javascript/mastodon/features/report/category.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/report/category.js b/app/javascript/mastodon/features/report/category.js
index 3658bb707..7eeae6da2 100644
--- a/app/javascript/mastodon/features/report/category.js
+++ b/app/javascript/mastodon/features/report/category.js
@@ -5,6 +5,7 @@ import { connect } from 'react-redux';
 import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 import Button from 'mastodon/components/button';
 import Option from './components/option';
+import { List as ImmutableList } from 'immutable';
 
 const messages = defineMessages({
   dislike: { id: 'report.reasons.dislike', defaultMessage: 'I don\'t like it' },
@@ -20,7 +21,7 @@ const messages = defineMessages({
 });
 
 const mapStateToProps = state => ({
-  rules: state.getIn(['server', 'rules']),
+  rules: state.getIn(['server', 'rules'], ImmutableList()),
 });
 
 export default @connect(mapStateToProps)