Skip to content

Commit

Permalink
Fix execution failure error after manually updating SQL.
Browse files Browse the repository at this point in the history
Update Code File:DB-GPT\web\components\chat\db-editor.tsx
  • Loading branch information
hec committed Aug 12, 2024
1 parent 6ddde54 commit 978f8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/components/chat/db-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function DbEditor() {
if (!value) {
return { sql: '', thoughts: '' };
}
const match = value && value.match(/(--.*)\n([\s\S]*)/);
const match = value && value.match(/(--.*)?\n?([\s\S]*)/);
let thoughts = '';
let sql;
if (match && match.length >= 3) {
Expand Down

0 comments on commit 978f8c0

Please sign in to comment.