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