Skip to content

Commit

Permalink
fix: Inspector breaks animationController (#437)
Browse files Browse the repository at this point in the history
this fixes #436
  • Loading branch information
wouterlucas authored Nov 6, 2024
2 parents b5bbd43 + 0948691 commit b65e7a9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main-api/Inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,15 @@ export class Inspector {
): IAnimationController => {
const animationController = originalAnimate.call(node, props, settings);

return {
...animationController,
start: () => {
this.animateNode(div, props, settings);
return animationController.start();
},
const originalStart =
animationController.start.bind(animationController);
animationController.start = () => {
this.animateNode(div, props, settings);

return originalStart();
};

return animationController;
},
});

Expand Down

0 comments on commit b65e7a9

Please sign in to comment.