Use isPlainObject from lodash instead

This commit is contained in:
Rémi de Juvigny 2023-04-21 12:38:17 +02:00
parent 0f29e9367a
commit 4465cb1ef8

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
const { has, isObject } = require('lodash/fp'); const { has, isPlainObject } = require('lodash/fp');
const ALLOWED_TYPES = [ const ALLOWED_TYPES = [
'biginteger', 'biginteger',
@ -59,8 +59,7 @@ const customFieldsRegistry = (strapi) => {
// Validate inputSize when provided // Validate inputSize when provided
if (inputSize) { if (inputSize) {
if ( if (
!isObject(inputSize) || !isPlainObject(inputSize) ||
Array.isArray(inputSize) ||
!has('default', inputSize) || !has('default', inputSize) ||
!has('isResizable', inputSize) !has('isResizable', inputSize)
) { ) {