From 4465cb1ef8b85c29ab30e885b9f8c9efd7baae5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20de=20Juvigny?= Date: Fri, 21 Apr 2023 12:38:17 +0200 Subject: [PATCH] Use isPlainObject from lodash instead --- packages/core/strapi/lib/core/registries/custom-fields.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/core/strapi/lib/core/registries/custom-fields.js b/packages/core/strapi/lib/core/registries/custom-fields.js index 18207fab1f..a911819e75 100644 --- a/packages/core/strapi/lib/core/registries/custom-fields.js +++ b/packages/core/strapi/lib/core/registries/custom-fields.js @@ -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) ) {