From a0b671c6f76ac0fb3a486590ddb0f7378bab236c Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 17 Feb 2023 02:31:41 +0100 Subject: [PATCH] [Dev] Fix unnecessary reset of animationRef (#2578) --- src/components/common/AnimatedSticker.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/common/AnimatedSticker.tsx b/src/components/common/AnimatedSticker.tsx index a94bcd821..dde67df13 100644 --- a/src/components/common/AnimatedSticker.tsx +++ b/src/components/common/AnimatedSticker.tsx @@ -177,10 +177,7 @@ const AnimatedSticker: FC = ({ useEffect(() => { return () => { - if (animationRef.current) { - animationRef.current.removeContainer(containerId); - animationRef.current = undefined; - } + animationRef.current?.removeContainer(containerId); }; }, [containerId]);