diff options
author | Erik Demaine <edemaine@mit.edu> | 2018-12-14 14:27:08 -0500 |
---|---|---|
committer | Erik Demaine <edemaine@mit.edu> | 2018-12-14 14:27:08 -0500 |
commit | 79554009233065d40117690158d99161e31cb5dc (patch) | |
tree | 143cbf007c0039e4cae4a8c89fa7ae86a65f4dff /src/types/PointArray.js | |
parent | 968b3f7e30f4c536727d7536f0b042c71682265a (diff) | |
download | svg.js-79554009233065d40117690158d99161e31cb5dc.tar.gz svg.js-79554009233065d40117690158d99161e31cb5dc.zip |
Avoid for..of loop
Diffstat (limited to 'src/types/PointArray.js')
-rw-r--r-- | src/types/PointArray.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/types/PointArray.js b/src/types/PointArray.js index 53ac425..2246bbd 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, |