mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-19 04:27:55 +01:00
use includes instead of indexOf
This commit is contained in:
parent
d92f6bb056
commit
8bf771b0f9
@ -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