From d3cf9e393873cc6178d77b23c5038c2d228914f4 Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:11:02 +0200 Subject: [PATCH] CB-4035 do not show confirm if it is only output tab (#2079) Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- .../packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts b/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts index 0e9eccaf61..19194d93bd 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/useSqlEditor.ts @@ -311,9 +311,9 @@ export function useSqlEditor(state: ISqlEditorTabState): ISQLEditorData { return; } - if (this.state.tabs.length) { - const processableTabs = this.state.tabs.filter(tab => tab.id !== OUTPUT_LOGS_TAB_ID); + const processableTabs = this.state.tabs.filter(tab => tab.id !== OUTPUT_LOGS_TAB_ID); + if (processableTabs.length > 0) { const result = await this.commonDialogService.open(ConfirmationDialog, { title: 'sql_editor_close_result_tabs_dialog_title', message: `Do you want to close ${processableTabs.length} tabs before executing script?`,