From 9351115c7ed7426f6e796a8d9310789c19ed86ef Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 10 Aug 2020 10:45:50 -0400 Subject: fixed warnings --- src/client/views/collections/collectionFreeForm/FormatShapePane.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/client/views/collections/collectionFreeForm') diff --git a/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx b/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx index c53e4de0f..1ffa2fbed 100644 --- a/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx +++ b/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx @@ -173,11 +173,7 @@ export default class FormatShapePane extends AntimodeMenu { const newPoints: { X: number, Y: number }[] = []; var counter = 0; for (var k = 0; k < index; k++) { - for (var l = 0; l < control.length; l++) { - if (pts[k].X === control[l].X && pts[k].Y === control[l].Y) { - counter++; - } - } + control.forEach(pt => (pts[k].X === pt.X && pts[k].Y === pt.Y) && counter++); } //decide where to put the new coordinate const spNum = Math.floor(counter / 2) * 4 + 2; -- cgit v1.2.3-70-g09d2