From b6bbd3e53465c3a3c4b30a25d5ead9eb78bfc309 Mon Sep 17 00:00:00 2001 From: Mark Kaylor Date: Fri, 23 Sep 2022 15:33:18 +0200 Subject: [PATCH] Remove use of lodash --- .../components/FormModal/forms/utils/addItemsToFormSection.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js b/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js index d0d0b12877..a24715dae2 100644 --- a/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js +++ b/packages/core/content-type-builder/admin/src/components/FormModal/forms/utils/addItemsToFormSection.js @@ -1,4 +1,3 @@ -import has from 'lodash/has'; /** * @description * Adds form options to the default section or as a new section @@ -7,7 +6,7 @@ import has from 'lodash/has'; */ const addItemsToFormSection = (formTypeOptions, sections) => { formTypeOptions.forEach((item) => { - if (!has(item, 'sectionTitle')) { + if (!item?.sectionTitle) { // When there is no sectionTitle key, // add the item to the default section sections[0].items.push(item);