framer / motion

Open source, production-ready animation and gesture library for React
https://framer.com/motion
MIT License
22.56k stars 749 forks source link

[BUG] `Maximum call stack size exceeded` error when using `delay` and `ease` function #2589

Closed bradlc closed 2 months ago

bradlc commented 2 months ago

Since v11.0.11 a Maximum call stack size exceeded error is thrown when:

Above is my understanding of the circumstances in which the error occurs, but you can check out the reproduction to verify:

CodeSandbox Reproduction

Steps to reproduce:

  1. Click the "Toggle Size" button
  2. Click the "Toggle Size" button again before the animation starts (i.e. within 2 seconds)

Expected (v11.0.10)

https://github.com/framer/motion/assets/2615508/0794273e-9e61-4702-ba64-4ef7996b3637

Actual (>= v11.0.11)

https://github.com/framer/motion/assets/2615508/7cdcf811-60b1-46fc-88a6-eed229f31792

pklada commented 2 months ago

Ran into this today too