mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +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
|
* @description
|
||||||
* Adds form options to the default section or as a new section
|
* 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) => {
|
const addItemsToFormSection = (formTypeOptions, sections) => {
|
||||||
formTypeOptions.forEach((item) => {
|
formTypeOptions.forEach((item) => {
|
||||||
if (!has(item, 'sectionTitle')) {
|
if (!item?.sectionTitle) {
|
||||||
// When there is no sectionTitle key,
|
// When there is no sectionTitle key,
|
||||||
// add the item to the default section
|
// add the item to the default section
|
||||||
sections[0].items.push(item);
|
sections[0].items.push(item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user