From edf657b659f5a9b2433473493b2ae139e2ada188 Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 3 Jul 2025 17:47:41 +0530 Subject: [PATCH] Revert "fix: add fallback for useModuleId hook in query panel" This reverts commit 27ba7dec307a4c365971109cbe445a2cbba0ad69. --- frontend/package.json | 2 +- .../src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 3034d57e39..57785151d3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -267,4 +267,4 @@ "jsx" ] } -} \ No newline at end of file +} diff --git a/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js b/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js index b5f549a354..1a41a7f19b 100644 --- a/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js +++ b/frontend/src/AppBuilder/CodeEditor/useQueryPanelKeyHooks.js @@ -7,14 +7,7 @@ export const useQueryPanelKeyHooks = (onChange, value, type) => { const queryPanelHeight = useStore((state) => state.queryPanel.queryPanelHeight); const runQueryOnShortcut = useStore((state) => state.queryPanel.runQueryOnShortcut); const previewQueryOnShortcut = useStore((state) => state.queryPanel.previewQueryOnShortcut); - - // Handle case where ModuleContext is not available - let moduleId; - try { - moduleId = useModuleId(); - } catch (error) { - moduleId = 'canvas'; // Default fallback - } + const moduleId = useModuleId(); const location = useLocation(); const { pathname } = location;