fix broken tests
This commit is contained in:
parent
99c2df1bfa
commit
57b10f8e96
2 changed files with 6 additions and 2 deletions
|
@ -100,6 +100,8 @@ export const createDataSet = <T extends Record<string, any>>(data: Accessor<T[]>
|
|||
});
|
||||
|
||||
const apply = (data: T[], mutations: Mutation[]) => {
|
||||
console.log('APPLY', data, mutations);
|
||||
|
||||
for (const mutation of mutations) {
|
||||
const path = mutation.key.split('.');
|
||||
|
||||
|
@ -162,6 +164,8 @@ export const createDataSet = <T extends Record<string, any>>(data: Accessor<T[]>
|
|||
const next = data();
|
||||
const nextValue = apply(deepCopy(next), untrack(() => mutations()));
|
||||
|
||||
console.log('EFFECT IS CALLED');
|
||||
|
||||
setState('value', nextValue);
|
||||
setState('snapshot', next);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue