SplitTextWrapper
makes new instance when the SplitText
is reverted
#152
Labels
bug
Something isn't working
I had a nasty problem with timeline that were breaking. In the end I figured out it was caused by the SplitTextWrapper after one of the text animations the SplitText was reverted. The SplitTextWrapper checks on isSplit and if it's not split then it creates a new SplitText instance on the ref. Problem was that the text animations were exposed. So at the moment that another timeline was exposed in the website it would trigger the callback of the useExposedAnimation. That then returns nothing because the ref was updated and there is no animation linked to that ref in the animation map. This caused that the parent animation would be recreated and break because of missing animations.
I now patched the transition component so that SplitTextWrapper doesn't check on the isSplit property anymore. It should be the responsibility of the developer to split it or revert it. That patch will be tested in the project.
Maybe the isSplit check was added to keep splitting when the children update or something like that. But in my case it was breaking the animations.
The text was updated successfully, but these errors were encountered: