chore: Minor refactoring for consistency (#2425)

This commit is contained in:
Lipis 2020-11-29 18:32:51 +02:00 committed by GitHub
parent 204c8370a0
commit b21fd49412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 76 additions and 82 deletions

View file

@ -44,10 +44,10 @@ export const mutateElement = <TElement extends Mutable<ExcalidrawElement>>(
const nextPoints = value;
if (prevPoints.length === nextPoints.length) {
let didChangePoints = false;
let i = prevPoints.length;
while (--i) {
const prevPoint: Point = prevPoints[i];
const nextPoint: Point = nextPoints[i];
let index = prevPoints.length;
while (--index) {
const prevPoint: Point = prevPoints[index];
const nextPoint: Point = nextPoints[index];
if (
prevPoint[0] !== nextPoint[0] ||
prevPoint[1] !== nextPoint[1]