mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 21:47:59 +01:00
use includes instead of indexOf
This commit is contained in:
parent
1fa98ae6de
commit
4825222b09
@ -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);
|
||||
|
||||
|
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user