remove useless code

This commit is contained in:
Pierre Noël 2022-02-15 15:03:38 +01:00
parent 8ccd3406b6
commit 1c1b08b8ac

View File

@ -1,14 +1,11 @@
import {
get,
isBoolean,
isNumber,
isNull,
isObject,
isArray,
isEmpty,
isNaN,
toNumber,
} from 'lodash';
import get from 'lodash/get';
import isBoolean from 'lodash/isBoolean';
import isNumber from 'lodash/isNumber';
import isNull from 'lodash/isNull';
import isObject from 'lodash/isObject';
import isEmpty from 'lodash/isEmpty';
import isNaN from 'lodash/isNaN';
import toNumber from 'lodash/toNumber';
import * as yup from 'yup';
import { translatedErrors as errorsTrads } from '@strapi/helper-plugin';
@ -226,13 +223,7 @@ const createYupSchemaAttribute = (type, validations, options) => {
return true;
}
if (
isValidJSONString(value) ||
isNumber(value) ||
isNull(value) ||
isObject(value) ||
isArray(value)
) {
if (isValidJSONString(value) || isNumber(value) || isNull(value) || isObject(value)) {
return true;
}