Remove use of lodash

This commit is contained in:
Mark Kaylor 2022-09-23 15:33:18 +02:00
parent d1c529b584
commit b6bbd3e534

View File

@ -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);