diff --git a/src/utils/point-utils.js b/src/utils/point-utils.js index 2153a81..550a130 100644 --- a/src/utils/point-utils.js +++ b/src/utils/point-utils.js @@ -27,16 +27,16 @@ const getPointDuration = (pointDateFrom, pointDateTo) => { return pointDuration.format('mm[M]'); }; -function getWeightForPrice(a, b) { - if (a.basePrice < b.basePrice) { +function getWeightForPrice(pointA, pointB) { + if (pointA.basePrice < pointB.basePrice) { return 1; } - if (a.basePrice > b.basePrice) { + if (pointA.basePrice > pointB.basePrice) { return -1; } - if (a.basePrice === b.basePrice) { + if (pointA.basePrice === pointB.basePrice) { return 0; } } @@ -58,16 +58,16 @@ function getWeightForTime(pointA, pointB) { } } -function getWeigthForDay(a, b) { - if (a.dateFrom > b.dateFrom) { +function getWeigthForDay(pointA, pointB) { + if (pointA.dateFrom > pointB.dateFrom) { return 1; } - if (a.dateFrom < b.dateFrom) { + if (pointA.dateFrom < pointB.dateFrom) { return -1; } - if (a.dateFrom === b.dateFrom) { + if (pointA.dateFrom === pointB.dateFrom) { return 0; } }