diff --git a/superset-frontend/src/SqlLab/utils/newQueryTabName.ts b/superset-frontend/src/SqlLab/utils/newQueryTabName.ts index c068fdd3d5cbb..ac0728339c934 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, ''),