You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2021/12/06 21:50:12 UTC

[superset] 01/05: Handle undefined (#17183)

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch 1.4
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 733fc7494cf24a93eaf6472ad05a677ed727e15e
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Thu Oct 21 19:34:32 2021 +0300

    Handle undefined (#17183)
    
    (cherry picked from commit 91199c30d8ccbc9d6fef86de30a9e3450f6f170c)
---
 superset-frontend/src/dashboard/util/getLeafComponentIdFromPath.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset-frontend/src/dashboard/util/getLeafComponentIdFromPath.js b/superset-frontend/src/dashboard/util/getLeafComponentIdFromPath.js
index 9f8f991..37bed77 100644
--- a/superset-frontend/src/dashboard/util/getLeafComponentIdFromPath.js
+++ b/superset-frontend/src/dashboard/util/getLeafComponentIdFromPath.js
@@ -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;