1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

Redundant Boolean call

This commit is contained in:
Bogdan Fazakas 2021-02-17 15:42:22 +02:00
parent 7d25bc07ce
commit ee25e29de0

View File

@ -40,9 +40,7 @@ export default function FormPublish({
field: FormFieldProps field: FormFieldProps
) { ) {
const value = const value =
field.type === 'checkbox' field.type === 'checkbox' ? !JSON.parse(e.target.value) : e.target.value
? !Boolean(JSON.parse(e.target.value))
: e.target.value
validateField(field.name) validateField(field.name)
setFieldValue(field.name, value) setFieldValue(field.name, value)
} }