diff --git a/dashboard/src2/components/devtools/database/SQLCodeEditor.vue b/dashboard/src2/components/devtools/database/SQLCodeEditor.vue index 70b18e0782..931e0d1f23 100644 --- a/dashboard/src2/components/devtools/database/SQLCodeEditor.vue +++ b/dashboard/src2/components/devtools/database/SQLCodeEditor.vue @@ -82,6 +82,10 @@ export default { selection.from, selection.to ); + if ((selectedText ?? '').trim() === '') { + emit('codeUnselected'); + return; + } emit('codeSelected', selectedText); } else { emit('codeUnselected');