Skip to content

Commit 6f87f09

Browse files
authored
Merge pull request #46 from mudlabs/patch-1
Ensure `src` ends with `.json` file extension
2 parents 215c3e1 + d3b0040 commit 6f87f09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/nativescript-lottie.android.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export class LottieView extends LottieViewBase {
8282

8383
private setSrc(src: string) {
8484
if (this.nativeView) {
85+
86+
src = /.json$/.test(src) ? src : `${src}.json`;
87+
8588
if (this.cacheStrategy) {
8689
this.nativeView.setAnimation(src, this.cacheStrategy);
8790
} else {

0 commit comments

Comments
 (0)