RLottie: Fix duplicated frame renders

This commit is contained in:
Alexander Zinchuk 2022-11-10 18:28:00 +04:00
parent 5812c4c7c6
commit e9c2df4beb

View File

@ -340,7 +340,10 @@ class RLottie {
const chunk = this.chunks[chunkIndex];
if (!chunk || chunk.length === 0) {
this.requestChunk(chunkIndex);
if (!chunk) {
this.requestChunk(chunkIndex);
}
this.isAnimating = false;
this.isWaiting = true;
return false;
@ -471,7 +474,7 @@ class RLottie {
}
private requestChunk(chunkIndex: number) {
if (this.chunks[chunkIndex] && this.chunks[chunkIndex]?.length !== 0) {
if (this.chunks[chunkIndex]) {
return;
}