Skip to content

Commit

Permalink
fix: update dotlottie-js utils for v2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf committed Nov 4, 2024
1 parent c052381 commit 28e6b57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-trains-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@dotlottie/dotlottie-js': patch
---

fix: getAnimations & getImages & getAudios for v2
10 changes: 5 additions & 5 deletions packages/dotlottie-js/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ export async function getAudio(

let audioPath = 'audio/';

if (version === '2.0.0') {
if (version === '2') {
audioPath = 'u/';
}

Expand Down Expand Up @@ -610,7 +610,7 @@ export async function getAllAudio(dotLottie: Uint8Array, filter?: UnzipFileFilte

let audioPath = 'audio/';

if (version === '2.0.0') {
if (version === '2') {
audioPath = 'u/';
}

Expand Down Expand Up @@ -726,7 +726,7 @@ export async function getImage(

let imagesPath = 'images/';

if (version === '2.0.0') {
if (version === '2') {
imagesPath = 'i/';
}

Expand Down Expand Up @@ -765,7 +765,7 @@ export async function getImages(dotLottie: Uint8Array, filter?: UnzipFileFilter)

let imagesPath = 'images/';

if (version === '2.0.0') {
if (version === '2') {
imagesPath = 'i/';
}

Expand Down Expand Up @@ -935,7 +935,7 @@ export async function getAnimations(

let animationsPath = 'animations/';

if (version === '2.0.0') {
if (version === '2') {
animationsPath = 'a/';
}

Expand Down

0 comments on commit 28e6b57

Please sign in to comment.