fix(sqllab): invalid dump sql shown after closing tab (#27295)

This commit is contained in:
JUST.in DO IT
2024-02-29 09:57:30 -08:00
committed by GitHub
parent d65f64d1ce
commit 8d245704ef
5 changed files with 91 additions and 6 deletions

View File

@@ -152,7 +152,10 @@ export default function sqlLabReducer(state = {}, action) {
newState = {
...newState,
tabHistory,
tabHistory:
tabHistory.length === 0 && newState.queryEditors.length > 0
? newState.queryEditors.slice(-1).map(qe => qe.id)
: tabHistory,
tables,
queries,
unsavedQueryEditor: {