[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:
Claire
2025-09-05 12:17:02 +02:00
parent fd733d0603
commit d595641b73

View File

@@ -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('');
}