Fix mutate regression
This commit is contained in:
parent
c3ef2b8855
commit
dd5836f75b
2 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
],
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"test:watch": "test --watchAll",
|
||||
"test:watch": "jest --watchAll",
|
||||
"lerna": "lerna",
|
||||
"start": "lerna run start:pre && lerna run start --stream --parallel",
|
||||
"start:www": "yarn build:packages && lerna run start --parallel & cd packages/www && yarn dev",
|
||||
|
|
|
@ -422,7 +422,7 @@ export class TLDR {
|
|||
const shape = this.getShape<T>(data, id, pageId)
|
||||
const change = fn(shape, i)
|
||||
beforeShapes[id] = Object.fromEntries(
|
||||
Object.keys(change).map((key) => [key, { ...shape[key as keyof T] }])
|
||||
Object.keys(change).map((key) => [key, shape[key as keyof T]])
|
||||
) as Partial<T>
|
||||
afterShapes[id] = change
|
||||
})
|
||||
|
@ -449,6 +449,8 @@ export class TLDR {
|
|||
return this.updateBindings(cData, id, beforeShapes, afterShapes, pageId)
|
||||
}, dataWithParentChanges)
|
||||
|
||||
console.log(beforeShapes)
|
||||
|
||||
return {
|
||||
before: beforeShapes,
|
||||
after: afterShapes,
|
||||
|
|
Loading…
Reference in a new issue