From 9d390a4d38eb09973cabf6413cb6ab071931928c Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 10 Jun 2025 21:00:01 +0200 Subject: [PATCH] fix: prevent quick add from opening project --- .../components/quick-actions/QuickActions.vue | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/quick-actions/QuickActions.vue b/frontend/src/components/quick-actions/QuickActions.vue index ccaf7cef5..de44d2ec8 100644 --- a/frontend/src/components/quick-actions/QuickActions.vue +++ b/frontend/src/components/quick-actions/QuickActions.vue @@ -492,18 +492,17 @@ async function doAction(type: ACTION_TYPE, item: DoAction) { } async function doCmd() { - if (results.value.length === 1 && results.value[0].items.length === 1) { - const result = results.value[0] - doAction(result.type, result.items[0]) - return - } + if (selectedCmd.value !== null && query.value !== '') { + closeQuickActions() + await selectedCmd.value.action() + return + } - if (selectedCmd.value === null || query.value === '') { - return - } - - closeQuickActions() - await selectedCmd.value.action() + if (results.value.length === 1 && results.value[0].items.length === 1) { + const result = results.value[0] + doAction(result.type, result.items[0]) + return + } } async function newTask() {