diff --git a/src/sliceActions/intersectionsToShapes.js b/src/sliceActions/intersectionsToShapes.js index 2afc83e..0cf09bd 100644 --- a/src/sliceActions/intersectionsToShapes.js +++ b/src/sliceActions/intersectionsToShapes.js @@ -122,7 +122,7 @@ export default function intersectionsToShapes(layerPoints, layerFaceIndexes, fac } } - connectPoints.sort(({ previous }) => -previous); + connectPoints.sort((a, b) => b.previous - a.previous); while (connectPoints.length !== 0) { let { next, previous } = connectPoints.pop();