de-lodashify
This commit is contained in:
parent
9648e45341
commit
2db420ac54
7 changed files with 44 additions and 56 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { uniq } from 'lodash'
|
||||
|
||||
import * as DateUtils from 'src/services/date_utils/date_utils.js'
|
||||
|
||||
const pollFallbackValues = {
|
||||
|
|
@ -19,9 +17,9 @@ export const pollFormToMasto = (poll) => {
|
|||
pollFallback(poll, 'expiryAmount'),
|
||||
)
|
||||
|
||||
const options = uniq(
|
||||
const options = [...new Set(
|
||||
pollFallback(poll, 'options').filter((option) => option !== ''),
|
||||
)
|
||||
)]
|
||||
if (options.length < 2) {
|
||||
return { errorKey: 'polls.not_enough_options' }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue