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;