mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 15:03:57 +00:00
try to fix #1025
This commit is contained in:
@@ -243,7 +243,7 @@
|
|||||||
tabComponent: 'QueryDesignTab',
|
tabComponent: 'QueryDesignTab',
|
||||||
focused: true,
|
focused: true,
|
||||||
props: {
|
props: {
|
||||||
conid: connection._id,
|
conid: connection?._id,
|
||||||
database: name,
|
database: name,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
icon: 'img perspective',
|
icon: 'img perspective',
|
||||||
tabComponent: 'PerspectiveTab',
|
tabComponent: 'PerspectiveTab',
|
||||||
props: {
|
props: {
|
||||||
conid: connection._id,
|
conid: connection?._id,
|
||||||
database: name,
|
database: name,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -267,14 +267,14 @@
|
|||||||
icon: 'img profiler',
|
icon: 'img profiler',
|
||||||
tabComponent: 'ProfilerTab',
|
tabComponent: 'ProfilerTab',
|
||||||
props: {
|
props: {
|
||||||
conid: connection._id,
|
conid: connection?._id,
|
||||||
database: name,
|
database: name,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRefreshSchemas = () => {
|
const handleRefreshSchemas = () => {
|
||||||
const conid = connection._id;
|
const conid = connection?._id;
|
||||||
const database = name;
|
const database = name;
|
||||||
apiCall('database-connections/dispatch-database-changed-event', {
|
apiCall('database-connections/dispatch-database-changed-event', {
|
||||||
event: 'schema-list-changed',
|
event: 'schema-list-changed',
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function handleConfirmSql(sql) {
|
async function handleConfirmSql(sql) {
|
||||||
saveScriptToDatabase({ conid: connection._id, database: name }, sql, false);
|
saveScriptToDatabase({ conid: connection?._id, database: name }, sql, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleGenerateDropAllObjectsScript = () => {
|
const handleGenerateDropAllObjectsScript = () => {
|
||||||
@@ -559,7 +559,7 @@ await dbgateApi.dropAllDbObjects(${JSON.stringify(
|
|||||||
: $lockedDatabaseMode
|
: $lockedDatabaseMode
|
||||||
? getNumberIcon(
|
? getNumberIcon(
|
||||||
$openedTabs.filter(
|
$openedTabs.filter(
|
||||||
x => !x.closedTime && x.props.conid == data?.connection?._id && x.props.database == data?.name
|
x => !x.closedTime && x.props?.conid == data?.connection?._id && x.props?.database == data?.name
|
||||||
).length
|
).length
|
||||||
)
|
)
|
||||||
: ''}
|
: ''}
|
||||||
|
|||||||
Reference in New Issue
Block a user