Skip to content

Commit d560f81

Browse files
committed
fix: quick fix after merge
1 parent e9fd6e9 commit d560f81

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/lottie.ios.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,19 @@ export class LottieView extends LottieViewBase {
107107
}
108108

109109
public playAnimation(): void {
110-
if (this.nativeView) {
111-
if (this.completionBlock) {
112-
this.nativeView.playWithCompletion((animationFinished: boolean) => {
113-
if (this.completionBlock) {
114-
this.completionBlock(animationFinished);
115-
}
116-
});
117-
} else {
118-
this.nativeView.play();
110+
setTimeout(() => {
111+
if (this.nativeView) {
112+
if (this.completionBlock) {
113+
this.nativeView.playWithCompletion((animationFinished: boolean) => {
114+
if (this.completionBlock) {
115+
this.completionBlock(animationFinished);
116+
}
117+
});
118+
} else {
119+
this.nativeView.play();
120+
}
119121
}
120-
}
122+
}, 0);
121123
}
122124

123125
public playAnimationFromProgressToProgress(startProgress: number, endProgress: number): void {

0 commit comments

Comments
 (0)