This commit is contained in:
Henry Jameson 2026-08-04 16:38:17 +03:00
commit b7907534b4
2 changed files with 4 additions and 4 deletions

View file

@ -17,9 +17,9 @@ export const pollFormToMasto = (poll) => {
pollFallback(poll, 'expiryAmount'), pollFallback(poll, 'expiryAmount'),
) )
const options = [...new Set( const options = [
pollFallback(poll, 'options').filter((option) => option !== ''), ...new Set(pollFallback(poll, 'options').filter((option) => option !== '')),
)] ]
if (options.length < 2) { if (options.length < 2) {
return { errorKey: 'polls.not_enough_options' } return { errorKey: 'polls.not_enough_options' }
} }

View file

@ -7,9 +7,9 @@ import {
get, get,
groupBy, groupBy,
isEqual, isEqual,
last,
set, set,
take, take,
last,
uniqWith, uniqWith,
unset, unset,
} from 'lodash' } from 'lodash'