mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 17:46:00 +00:00
fix
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import _ from 'lodash';
|
||||
import { currentDatabase, openedTabs } from '../stores';
|
||||
import { getConnectionInfo } from './metadataLoaders';
|
||||
|
||||
let lastCurrentTab = null;
|
||||
|
||||
openedTabs.subscribe(value => {
|
||||
openedTabs.subscribe(async value => {
|
||||
const newCurrentTab = (value || []).find(x => x.selected);
|
||||
if (newCurrentTab == lastCurrentTab) return;
|
||||
|
||||
@@ -14,8 +15,9 @@ openedTabs.subscribe(value => {
|
||||
database &&
|
||||
(conid != _.get(lastCurrentTab, 'props.conid') || database != _.get(lastCurrentTab, 'props.database'))
|
||||
) {
|
||||
const connection = await getConnectionInfo({ conid });
|
||||
currentDatabase.set({
|
||||
connection: { _id: conid },
|
||||
connection,
|
||||
name: database,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user