Skip to content

Commit

Permalink
fix: add null case
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Jun 13, 2024
1 parent ff888b6 commit 367c746
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/monaco-plugin-ob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanbase-odc/monaco-plugin-ob",
"version": "1.2.2",
"version": "1.2.3",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions packages/monaco-plugin-ob/src/oboracle/worker/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ export default {
*/
const sqlDocuments = getSQLDocument(sqlStr, delimiter);
const sqlStatement = sqlDocuments.statements?.[0];
if (!sqlStatement) {
return null;
}
return sqlCompletion(sqlStatement, sqlOffset)
} else {
tokens = tokens?.filter(token => plKeywordsSet.has(token));
Expand Down

0 comments on commit 367c746

Please sign in to comment.