Skip to content

Commit

Permalink
fix for loop over animatables without changing typescript target
Browse files Browse the repository at this point in the history
  • Loading branch information
zplata committed Jun 7, 2023
1 parent 9dd2826 commit f44df26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/rive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class Animator {
// Play/pause already instanced items, or create new instances
const instancedAnimationNames = this.animations.map((a) => a.name);
const instancedMachineNames = this.stateMachines.map((m) => m.name);
for (const [i] of animatables.entries()) {
for (let i = 0; i < animatables.length; i++) {
const aIndex = instancedAnimationNames.indexOf(animatables[i]);
const mIndex = instancedMachineNames.indexOf(animatables[i]);
if (aIndex >= 0 || mIndex >= 0) {
Expand Down

0 comments on commit f44df26

Please sign in to comment.