mirror of
https://github.com/strapi/strapi.git
synced 2025-08-03 14:28:40 +00:00
remove useless code
This commit is contained in:
parent
8ccd3406b6
commit
1c1b08b8ac
@ -1,14 +1,11 @@
|
|||||||
import {
|
import get from 'lodash/get';
|
||||||
get,
|
import isBoolean from 'lodash/isBoolean';
|
||||||
isBoolean,
|
import isNumber from 'lodash/isNumber';
|
||||||
isNumber,
|
import isNull from 'lodash/isNull';
|
||||||
isNull,
|
import isObject from 'lodash/isObject';
|
||||||
isObject,
|
import isEmpty from 'lodash/isEmpty';
|
||||||
isArray,
|
import isNaN from 'lodash/isNaN';
|
||||||
isEmpty,
|
import toNumber from 'lodash/toNumber';
|
||||||
isNaN,
|
|
||||||
toNumber,
|
|
||||||
} from 'lodash';
|
|
||||||
|
|
||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
import { translatedErrors as errorsTrads } from '@strapi/helper-plugin';
|
import { translatedErrors as errorsTrads } from '@strapi/helper-plugin';
|
||||||
@ -226,13 +223,7 @@ const createYupSchemaAttribute = (type, validations, options) => {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (isValidJSONString(value) || isNumber(value) || isNull(value) || isObject(value)) {
|
||||||
isValidJSONString(value) ||
|
|
||||||
isNumber(value) ||
|
|
||||||
isNull(value) ||
|
|
||||||
isObject(value) ||
|
|
||||||
isArray(value)
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user