Closed MengWeiChen closed 4 years ago
Thanks for raising this issue. I saw your fix, but opted for a different fix that hopefully accomplishes the same thing without adding another class variable (e865fd8). Thanks for contributing regardless, I always appreciate the community support! I released 2.1.2 with the fix, let me know if it also solves your crash.
Sorry, I don't explain clearly enough before.
Actually, the crash reason is not caused by animateOut
,
My case is when Popover is mounted, animateIn
is playing,
then user unmount the Popover component.
Now Popover is unmounted, but the animation (animateIn
) is not complete.
When the animation is complete, it will trigger getRectForRef
, but popoverRef does not exist anymore.
Finally, popoverRef gets nothing, that causes crash happen.
So do you have any other idea to fix this issue?
thanks.
Ok, I published 2.1.3 with a second fix, that is similar to yours but with an additional check to make sure this.popoverRef
is not null. See if that works for you. Thanks for explaining, I hadn't considered that situation.
Version 2.1.3 fix my crash issue very well 😀.
Ok great to hear! Thanks again for your help.
Fix android crash issue when component unmount before animation is finished