Merge pull request #31150 from appsmithorg/cherry-pick/15Feb24
fix: Datasource null check in QueryDebugger (#31115)
This commit is contained in:
commit
b3f3b7f418
|
|
@ -98,18 +98,21 @@ function QueryDebuggerTabs({
|
|||
);
|
||||
|
||||
const datasourceStructure = useSelector((state) =>
|
||||
getDatasourceStructureById(state, currentActionConfig?.datasource.id || ""),
|
||||
getDatasourceStructureById(
|
||||
state,
|
||||
currentActionConfig?.datasource?.id ?? "",
|
||||
),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
currentActionConfig?.datasource.id &&
|
||||
currentActionConfig?.datasource?.id &&
|
||||
datasourceStructure === undefined &&
|
||||
pluginDatasourceForm !== DatasourceComponentTypes.RestAPIDatasourceForm
|
||||
) {
|
||||
dispatch(
|
||||
fetchDatasourceStructure(
|
||||
currentActionConfig?.datasource.id,
|
||||
currentActionConfig.datasource.id,
|
||||
true,
|
||||
DatasourceStructureContext.QUERY_EDITOR,
|
||||
),
|
||||
|
|
@ -180,7 +183,7 @@ function QueryDebuggerTabs({
|
|||
});
|
||||
}
|
||||
|
||||
if (showSchema && currentActionConfig) {
|
||||
if (showSchema && currentActionConfig && currentActionConfig.datasource) {
|
||||
responseTabs.unshift({
|
||||
key: "schema",
|
||||
title: "Schema",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user