[Glitch] Fix Edit as well as “Delete & Redraft” on a poll not inserting empty option
Port d8c07be021 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
7fcd9184d2
commit
24e2bd2d6c
3 files changed
+34
-14
No files matched your search
@@ -89,11 +89,16 @@ export function fetchStatusFail(id, error, skipLoading) {
|
||||
}
|
||||
|
||||
export function redraft(status, raw_text, content_type) {
|
||||
return {
|
||||
type: REDRAFT,
|
||||
status,
|
||||
raw_text,
|
||||
content_type,
|
||||
return (dispatch, getState) => {
|
||||
const maxOptions = getState().server.getIn(['server', 'configuration', 'polls', 'max_options']);
|
||||
|
||||
dispatch({
|
||||
type: REDRAFT,
|
||||
status,
|
||||
raw_text,
|
||||
content_type,
|
||||
maxOptions,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user