fix(sqllab): inactive leftbar selector on empty state (#38833)

This commit is contained in:
JUST.in DO IT
2026-03-26 08:57:16 -07:00
committed by GitHub
parent 43816d7528
commit cfa1aba1e0
6 changed files with 67 additions and 4 deletions

View File

@@ -42,7 +42,10 @@ function alterUnsavedQueryEditorState(
id: string,
silent = false,
): Partial<SqlLabState> {
if (state.tabHistory[state.tabHistory.length - 1] !== id) {
if (
state.tabHistory.length > 0 &&
state.tabHistory[state.tabHistory.length - 1] !== id
) {
const { queryEditors } = alterInArr(
state,
'queryEditors',