svelte-legos
svelte-legos copied to clipboard
fix: history middleware does not work with nested objects
Hi, I'm facing an issue with the history middleware. It works well with properties on the top level but in my case my store looks like this:
const myStore = history(
writable({
a: 'a',
b: 'b',
c: 0,
d: [
{
e: 1,
f: {
g: 'g',
h: 'h'
}
},
...
],
...
})
);
Every time I update a value part of d
, I'm not able to undo or redo
Can you please share an example of how you are updating the myStore for d
.