Skip to content

Commit

Permalink
refactor(sql-editor): Hide 'Run Selected Query' btn if query is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt committed Jan 8, 2025
1 parent 27fa563 commit e4fddcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dashboard/src2/components/devtools/database/SQLCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export default {
selection.from,
selection.to
);
if ((selectedText ?? '').trim() === '') {
emit('codeUnselected');
return;
}
emit('codeSelected', selectedText);
} else {
emit('codeUnselected');
Expand Down

0 comments on commit e4fddcf

Please sign in to comment.