From a54b8d719c6454500b885050c9ce6feaf7cfae1f Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Thu, 21 Nov 2024 13:28:33 +0100 Subject: [PATCH] fix: issue saving queries as file --- src/renderer/components/WorkspaceTabQuery.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/WorkspaceTabQuery.vue b/src/renderer/components/WorkspaceTabQuery.vue index 24f5f96f..035122fc 100644 --- a/src/renderer/components/WorkspaceTabQuery.vue +++ b/src/renderer/components/WorkspaceTabQuery.vue @@ -745,7 +745,7 @@ const saveFileAs = async () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const result: any = await Application.showSaveDialog({ filters: [{ name: 'SQL', extensions: ['sql'] }], - defaultPath: (!queryName.value.includes('.sql') ? `${queryName.value}.sql` :queryName.value) || 'query.sql' + defaultPath: (queryName.value !== undefined && !queryName.value.includes('.sql') ? `${queryName.value}.sql` : queryName.value) || 'query.sql' }); if (result && !result.canceled) {