From 8fe47c484ad202ebb5de007a53f479d4b24b5166 Mon Sep 17 00:00:00 2001 From: Isac Petinate Date: Fri, 17 May 2024 06:31:38 -0300 Subject: [PATCH] fix: ask preset name only if confirm to save --- src/actions/guided.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/actions/guided.js b/src/actions/guided.js index b4e3436..a164295 100644 --- a/src/actions/guided.js +++ b/src/actions/guided.js @@ -71,14 +71,14 @@ export async function guidedAction(resourceName) { message: 'Do you want to save the answers as a preset to use later?' }) - /** - * Save answers as new preset - * - * @type {boolean} - */ - const presetName = await presetNamePrompt() - if (savePreset) { + /** + * Save answers as new preset + * + * @type {boolean} + */ + const presetName = await presetNamePrompt() + const { success, path } = saveAnswersAsPreset(presetName, answers) if (success) {