From b78769af0ff1225fea82c24b44812e104095fb0d Mon Sep 17 00:00:00 2001 From: Naumov Alexey Date: Tue, 13 Jul 2021 13:09:28 +0300 Subject: [PATCH] fix(plugin-sql-editor): CB-1117 add check for empty query --- .../SqlResultTabs/ExecutionPlan/SqlExecutionPlanService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanService.ts b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanService.ts index 14fcb20f04..e601738eff 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanService.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanService.ts @@ -43,8 +43,12 @@ export class SqlExecutionPlanService { editorState: ISqlEditorTabState, query: string, ): Promise { + if (!query.trim()) { + return; + } + if (!editorState.executionContext) { - console.error('executeEditorQuery executionContext is not provided'); + console.error('executeExecutionPlan executionContext is not provided'); return; }