Handle undefined (#17183)

This commit is contained in:
Geido 2021-10-21 19:34:32 +03:00 committed by GitHub
parent 860e481a97
commit 91199c30d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ export default function getLeafComponentIdFromPath(directPathToChild = []) {
while (currentPath.length) {
const componentId = currentPath.pop();
const componentType = componentId.split('-')[0];
const componentType = componentId && componentId.split('-')[0];
if (!IN_COMPONENT_ELEMENT_TYPES.includes(componentType)) {
return componentId;