mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
Update currentTab when close tabs #112
This commit is contained in:
@@ -36,9 +36,11 @@ export default {
|
||||
state.currentTabId = state.tabs[index - 1].id
|
||||
} else {
|
||||
state.currentTabId = null
|
||||
state.currentTab = null
|
||||
state.untitledLastIndex = 0
|
||||
}
|
||||
state.currentTab = state.currentTabId
|
||||
? state.tabs.find(tab => tab.id === state.currentTabId)
|
||||
: null
|
||||
}
|
||||
state.tabs.splice(index, 1)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user