mirror of
https://github.com/strapi/strapi.git
synced 2025-08-01 05:17:14 +00:00
remove useless code
This commit is contained in:
parent
8ccd3406b6
commit
1c1b08b8ac
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user