From a839d87ee6b5517a40789990069317f1b03518c5 Mon Sep 17 00:00:00 2001 From: Egor Aristov Date: Wed, 7 May 2025 04:13:00 +0300 Subject: [PATCH] better --- frontend/wizard-vue/src/stores/wizard.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/wizard-vue/src/stores/wizard.ts b/frontend/wizard-vue/src/stores/wizard.ts index 1775fdd..d50362f 100644 --- a/frontend/wizard-vue/src/stores/wizard.ts +++ b/frontend/wizard-vue/src/stores/wizard.ts @@ -22,8 +22,8 @@ export const useWizardStore = defineStore('wizard', () => { localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(specs)); }, 100); - function updateSpec(fieldName: keyof Specs, newValue: SpecValue) { - (specs as Record)[fieldName] = newValue; + function updateSpec(fieldName: K, newValue: Specs[K]) { + specs[fieldName] = newValue; updateLocalStorage(); } function updateSpecs(newValue: Specs) {