[Dev] Fix unnecessary reset of animationRef (#2578)

This commit is contained in:
Alexander Zinchuk 2023-02-17 02:31:41 +01:00
parent d228deb66c
commit a0b671c6f7

View File

@ -177,10 +177,7 @@ const AnimatedSticker: FC<OwnProps> = ({
useEffect(() => {
return () => {
if (animationRef.current) {
animationRef.current.removeContainer(containerId);
animationRef.current = undefined;
}
animationRef.current?.removeContainer(containerId);
};
}, [containerId]);