Arrow functions and so
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -11,9 +11,9 @@ const buildPoll = (draftStatus: DraftStatus) => {
|
||||
if (draftStatus.hasIn(['poll', 'options'])) {
|
||||
return draftStatus.poll!
|
||||
.set('id', `${draftStatus.draft_id}-poll`)
|
||||
.update('options', (options: ImmutableMap<string, any>) => {
|
||||
return options.map((title: string) => ImmutableMap({ title }));
|
||||
});
|
||||
.update('options', (options: ImmutableMap<string, any>) =>
|
||||
options.map((title: string) => ImmutableMap({ title })),
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user