solid-record
solid-record copied to clipboard
Undo fails at reverting additions to a store object
When using a store with objects and adding new key value pairs, undo (and probably redo) don’t quite work. Oddly enough it works fine if it is used with object signals
Example to reproduce:
const [data, setData, history] = record(createStore({}));
setData({ hello: true }) // This will be pushed to record history
history.undo() // This will move the undo index backwards but not revert the last setData
return <h1>{data.hello.toString()}</h1> // true