diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 73468c04fe..330dcd93d0 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -491,9 +491,9 @@ export const composeReducer = (state = initialState, action) => { if (action.status.get('poll')) { map.set('poll', ImmutableMap({ - options: action.status.getIn(['poll', 'options']).map(x => x.get('title')), - multiple: action.status.getIn(['poll', 'multiple']), - expires_in: expiresInFromExpiresAt(action.status.getIn(['poll', 'expires_at'])), + options: ImmutableList(action.status.get('poll').options.map(x => x.title)), + multiple: action.status.get('poll').multiple, + expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at), })); } }); @@ -520,9 +520,9 @@ export const composeReducer = (state = initialState, action) => { if (action.status.get('poll')) { map.set('poll', ImmutableMap({ - options: action.status.getIn(['poll', 'options']).map(x => x.get('title')), - multiple: action.status.getIn(['poll', 'multiple']), - expires_in: expiresInFromExpiresAt(action.status.getIn(['poll', 'expires_at'])), + options: ImmutableList(action.status.get('poll').options.map(x => x.title)), + multiple: action.status.get('poll').multiple, + expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at), })); } });