mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-11 14:30:35 +00:00
[Glitch] Fix editing or deleting and redrafting polls in 4.3
Port 055be70c59 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -623,7 +623,7 @@ export default function compose(state = initialState, action) {
|
||||
}
|
||||
|
||||
if (action.status.get('poll')) {
|
||||
let options = ImmutableList(action.status.get('poll').options.map(x => x.title));
|
||||
let options = action.status.getIn(['poll', 'options']).map(x => x.get('title'));
|
||||
if (options.size < action.maxOptions) {
|
||||
options = options.push('');
|
||||
}
|
||||
@@ -658,7 +658,7 @@ export default function compose(state = initialState, action) {
|
||||
}
|
||||
|
||||
if (action.status.get('poll')) {
|
||||
let options = ImmutableList(action.status.get('poll').options.map(x => x.title));
|
||||
let options = action.status.getIn(['poll', 'options']).map(x => x.get('title'));
|
||||
if (options.size < action.maxOptions) {
|
||||
options = options.push('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user