This commit is contained in:
SPRINX0\prochazka
2025-02-03 14:43:08 +01:00
parent 0f36ea7b58
commit 4d8952d3ee

View File

@@ -243,7 +243,7 @@
tabComponent: 'QueryDesignTab',
focused: true,
props: {
conid: connection._id,
conid: connection?._id,
database: name,
},
});
@@ -255,7 +255,7 @@
icon: 'img perspective',
tabComponent: 'PerspectiveTab',
props: {
conid: connection._id,
conid: connection?._id,
database: name,
},
});
@@ -267,14 +267,14 @@
icon: 'img profiler',
tabComponent: 'ProfilerTab',
props: {
conid: connection._id,
conid: connection?._id,
database: name,
},
});
};
const handleRefreshSchemas = () => {
const conid = connection._id;
const conid = connection?._id;
const database = name;
apiCall('database-connections/dispatch-database-changed-event', {
event: 'schema-list-changed',
@@ -285,7 +285,7 @@
};
async function handleConfirmSql(sql) {
saveScriptToDatabase({ conid: connection._id, database: name }, sql, false);
saveScriptToDatabase({ conid: connection?._id, database: name }, sql, false);
}
const handleGenerateDropAllObjectsScript = () => {
@@ -559,7 +559,7 @@ await dbgateApi.dropAllDbObjects(${JSON.stringify(
: $lockedDatabaseMode
? getNumberIcon(
$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
)
: ''}