fix(sqllab): unable to create new tabs (#21260)

This commit is contained in:
JUST.in DO IT 2022-08-30 13:54:42 -07:00 committed by GitHub
parent 944808a0ce
commit 034ee1c3c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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, ''),