From a0713938b395cb68e8bfb9887f09af8f881e0641 Mon Sep 17 00:00:00 2001 From: Lily Kuang Date: Tue, 6 Oct 2020 22:11:16 -0700 Subject: [PATCH] fixed undefined names error (#11180) --- .../src/views/CRUD/data/savedquery/SavedQueryList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx b/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx index 15b9ba2856..93770c7c34 100644 --- a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx +++ b/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx @@ -256,7 +256,7 @@ function SavedQueryList({ }, }: any) => { const names = tables.map((table: any) => table.table); - const main = names.shift(); + const main = names.length > 0 ? names.shift() : ''; if (names.length) { return (