Skip to content

Commit d07e7d5

Browse files
committed
fix(iOS): unhandled transient rejection
1 parent a7cd4c3 commit d07e7d5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/nativescript-lottie.ios.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ export class LottieView extends LottieViewBase {
6767
}
6868

6969
if (this.autoPlay) {
70-
this.playAnimation();
70+
this.playAnimation().then(finished => {
71+
// ignore
72+
// TODO: could add debug mode which would log that it finished
73+
}, err => {
74+
// ignore (however note todo above)
75+
});
7176
}
7277
}
7378

@@ -89,7 +94,12 @@ export class LottieView extends LottieViewBase {
8994
this.contentModeDefault();
9095

9196
if (!this.isAnimating()) {
92-
this.playAnimation();
97+
this.playAnimation().then(finished => {
98+
// ignore
99+
// TODO: could add debug mode which would log that it finished
100+
}, err => {
101+
// ignore (however note todo above)
102+
});
93103
}
94104
} else {
95105
if (this.isAnimating()) {

0 commit comments

Comments
 (0)