From 79554009233065d40117690158d99161e31cb5dc Mon Sep 17 00:00:00 2001 From: Erik Demaine Date: Fri, 14 Dec 2018 14:27:08 -0500 Subject: [PATCH] Avoid for..of loop --- src/types/PointArray.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/PointArray.js b/src/types/PointArray.js index 53ac4253..2246bbd4 100644 --- a/src/types/PointArray.js +++ b/src/types/PointArray.js @@ -75,7 +75,8 @@ extend(PointArray, { transform (m) { const points = [] - for (let point of this) { + for (let i = 0; i < this.length; i++) { + const point = this[i] // Perform the matrix multiplication points.push([ m.a * point[0] + m.c * point[1] + m.e,