diff --git a/.changeset/serious-trains-brake.md b/.changeset/serious-trains-brake.md new file mode 100644 index 0000000..3becc94 --- /dev/null +++ b/.changeset/serious-trains-brake.md @@ -0,0 +1,5 @@ +--- +'@dotlottie/dotlottie-js': patch +--- + +fix: getAnimations & getImages & getAudios for v2 diff --git a/packages/dotlottie-js/src/utils.ts b/packages/dotlottie-js/src/utils.ts index 091107b..9c17be3 100644 --- a/packages/dotlottie-js/src/utils.ts +++ b/packages/dotlottie-js/src/utils.ts @@ -571,7 +571,7 @@ export async function getAudio( let audioPath = 'audio/'; - if (version === '2.0.0') { + if (version === '2') { audioPath = 'u/'; } @@ -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/'; } @@ -726,7 +726,7 @@ export async function getImage( let imagesPath = 'images/'; - if (version === '2.0.0') { + if (version === '2') { imagesPath = 'i/'; } @@ -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/'; } @@ -935,7 +935,7 @@ export async function getAnimations( let animationsPath = 'animations/'; - if (version === '2.0.0') { + if (version === '2') { animationsPath = 'a/'; }