Skip to content

Commit b65e7a9

Browse files
authored
fix: Inspector breaks animationController (#437)
this fixes #436
2 parents b5bbd43 + 0948691 commit b65e7a9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/main-api/Inspector.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,15 @@ export class Inspector {
311311
): IAnimationController => {
312312
const animationController = originalAnimate.call(node, props, settings);
313313

314-
return {
315-
...animationController,
316-
start: () => {
317-
this.animateNode(div, props, settings);
318-
return animationController.start();
319-
},
314+
const originalStart =
315+
animationController.start.bind(animationController);
316+
animationController.start = () => {
317+
this.animateNode(div, props, settings);
318+
319+
return originalStart();
320320
};
321+
322+
return animationController;
321323
},
322324
});
323325

0 commit comments

Comments
 (0)