Skip to content

Commit

Permalink
Handle undefined (#17183)
Browse files Browse the repository at this point in the history
(cherry picked from commit 91199c3)
  • Loading branch information
geido authored and eschutho committed Dec 6, 2021
1 parent 361e510 commit 733fc74
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 733fc74

Please sign in to comment.