mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
Remove use of lodash
This commit is contained in:
parent
d1c529b584
commit
b6bbd3e534
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user