diff --git a/app/client/src/navigation/FocusSelectors.ts b/app/client/src/navigation/FocusSelectors.ts index 73ac8979a1..0eb20e058b 100644 --- a/app/client/src/navigation/FocusSelectors.ts +++ b/app/client/src/navigation/FocusSelectors.ts @@ -65,9 +65,8 @@ export const getSelectedQueryId = (path: string): QueryListState => { ]); if (!match) return undefined; const { apiId, pluginPackageName, queryId } = match.params; - if (!queryId || !apiId) { - return undefined; - } + const id = apiId ? apiId : queryId; + if (!id) return undefined; let type: PluginType = PluginType.API; if (pluginPackageName) { type = PluginType.SAAS; @@ -76,7 +75,7 @@ export const getSelectedQueryId = (path: string): QueryListState => { } return { type, - id: apiId || queryId, + id, pluginPackageName, }; };