Skip to content

Commit

Permalink
fix: asset updating
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Mar 6, 2024
1 parent f31f4b6 commit a8f1e9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/features/drawer/settings/UAssets.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}))
Expand Down

0 comments on commit a8f1e9c

Please # to comment.