trunc seconds when fitting tourney bars into lanes

pull/9871/head
nickolay 2021-09-23 21:11:26 +03:00
parent de26882c85
commit 92027fce43
1 changed files with 1 additions and 3 deletions

View File

@ -76,9 +76,7 @@ function truncSeconds(epoch: number): number {
function fitLane(lane: Lane, tour2: Tournament) {
return !lane.some(function (tour1: Tournament) {
const r = !(truncSeconds(tour1.finishesAt) <= truncSeconds(tour2.startsAt) || truncSeconds(tour2.finishesAt) <= truncSeconds(tour1.startsAt));
if (r) console.log("r=", r, tour1, tour2);
return r;
return !(truncSeconds(tour1.finishesAt) <= truncSeconds(tour2.startsAt) || truncSeconds(tour2.finishesAt) <= truncSeconds(tour1.startsAt));
});
}