From 034ee1c3c1fda20b238ba1cc9093a4156d9fa01e Mon Sep 17 00:00:00 2001 From: "JUST.in DO IT" Date: Tue, 30 Aug 2022 13:54:42 -0700 Subject: [PATCH] fix(sqllab): unable to create new tabs (#21260) --- superset-frontend/src/SqlLab/utils/newQueryTabName.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/utils/newQueryTabName.ts b/superset-frontend/src/SqlLab/utils/newQueryTabName.ts index c068fdd3d5..ac0728339c 100644 --- a/superset-frontend/src/SqlLab/utils/newQueryTabName.ts +++ b/superset-frontend/src/SqlLab/utils/newQueryTabName.ts @@ -31,7 +31,7 @@ export const newQueryTabName = ( if (queryEditors.length > 0) { const mappedUntitled = queryEditors.filter(qe => - qe.name.match(untitledQueryRegex), + qe.name?.match(untitledQueryRegex), ); const untitledQueryNumbers = mappedUntitled.map( qe => +qe.name.replace(untitledQuery, ''),