From a8f1e9c1ca0ea9df7da4e12a0c48e080a97556c4 Mon Sep 17 00:00:00 2001 From: Derick M <58572875+TurtIeSocks@users.noreply.github.com> Date: Wed, 6 Mar 2024 10:38:45 -0500 Subject: [PATCH] fix: asset updating --- src/features/drawer/settings/UAssets.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/features/drawer/settings/UAssets.jsx b/src/features/drawer/settings/UAssets.jsx index 14e10948b..88a567c55 100644 --- a/src/features/drawer/settings/UAssets.jsx +++ b/src/features/drawer/settings/UAssets.jsx @@ -56,9 +56,10 @@ function UAssetSelect({ asset, category }) { value={options?.has(value) ? value : ''} label={t(`${category}_${asset}`, `${category} ${instanceName}`)} onChange={({ target }) => { - useMemory - .getState() - [instanceName].setSelection(target.name, target.value) + useMemory.setState((prev) => { + prev[instanceName].setSelection(target.name, target.value) + return { [instanceName]: prev[instanceName] } + }) useStorage.setState((prev) => ({ [asset]: { ...prev[asset], [target.name]: target.value }, }))