Skip to content

Commit

Permalink
Merge pull request #3878 from remotion-dev/fix-for-in-loop-electron
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed May 16, 2024
2 parents 7282517 + 92b7d68 commit 494ae68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/interpolate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ function checkInfiniteRange(name: string, arr: readonly number[]) {
throw new Error(name + ' must have at least 2 elements');
}

for (const index in arr) {
if (typeof arr[index] !== 'number') {
for (const element of arr) {
if (typeof element !== 'number') {
throw new Error(`${name} must contain only numbers`);
}

if (arr[index] === -Infinity || arr[index] === Infinity) {
if (!Number.isFinite(element)) {
throw new Error(
`${name} must contain only finite numbers, but got [${arr.join(',')}]`,
);
Expand Down

0 comments on commit 494ae68

Please sign in to comment.