Skip to content

🎥 Make videos programmatically with React

Update Lottie.tsx

Jonny Burgere87e18e9eec9
diff --git a/packages/lottie/src/Lottie.tsx b/packages/lottie/src/Lottie.tsx
index e35413a529..28103827f6 100644
--- a/packages/lottie/src/Lottie.tsx
+++ b/packages/lottie/src/Lottie.tsx
@@ -57,6 +57,7 @@ export const Lottie = ({
const onComplete = () => {
// Seek frame twice to avoid Lottie initialization bug:
// See LottieInitializationBugfix composition in the example project for a repro.
+ // We can work around it by seeking twice, initially.
if (currentFrameRef.current) {
animationRef.current?.goToAndStop(
Math.max(0, currentFrameRef.current - 1),