From dd14fe0a7033066e2cc20ab370bb294c1cdda9ec Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Mon, 23 Dec 2024 15:03:37 +1000 Subject: [PATCH] fix sqleditor --- apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx b/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx index 4e14952268b..2f5b532fb11 100644 --- a/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx +++ b/apps/studio/components/interfaces/SQLEditor/SQLEditor.tsx @@ -267,7 +267,7 @@ export const SQLEditor = () => { const selection = editor.getSelection() const selectedValue = selection ? editor.getModel()?.getValueInRange(selection) : undefined - const sql = snippet + let sql = snippet ? (selectedValue || editorRef.current?.getValue()) ?? snippet.snippet.content?.sql : selectedValue || editorRef.current?.getValue()