mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 14:34:19 +00:00
🐛 Fix possible bug in useArrayState
This commit is contained in:
parent
1abf0d0dc9
commit
abac554e95
1 changed files with 1 additions and 2 deletions
|
@ -25,9 +25,8 @@ export default function useArrayState(def) {
|
||||||
console.debug("Splicing ", position, " from ArrayState")
|
console.debug("Splicing ", position, " from ArrayState")
|
||||||
setValue(
|
setValue(
|
||||||
oldArray => {
|
oldArray => {
|
||||||
// TODO: Hope this doesn't break anything...
|
|
||||||
oldArray.splice(position, 1)
|
oldArray.splice(position, 1)
|
||||||
return oldArray
|
return [...oldArray]
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue