Skip to content

Commit

Permalink
Handle undefined (#17183)
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored Oct 21, 2021
1 parent 860e481 commit 91199c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 91199c3

Please sign in to comment.