use includes instead of indexOf

This commit is contained in:
casperlamboo 2017-05-26 17:14:14 +02:00 committed by Simon Voordouw
parent 1fa98ae6de
commit 4825222b09
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ export default function intersectionsToShapes(layerIntersectionIndexes, layerInt
index = firstPoints[0];
while (index !== -1) {
if (firstPoints.indexOf(index) === -1) {
if (!firstPoints.includes(index)) {
const intersection = intersectionPoints[index];
shape.unshift(intersection);

View File

@ -95,7 +95,7 @@ function optimizeShape(shape, start) {
let pathIndex;
for (let i = 0; i < inputPaths.length; i ++) {
if (donePaths.indexOf(i) !== -1) continue;
if (donePaths.includes(i)) continue;
const path = inputPaths[i];