From 5f52367403a44eeb8b0fb5406a71d855929c0e3f Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 7 Jan 2021 19:36:08 +0100 Subject: [PATCH] Fix formatting graphs ts --- ts/graphs/future-due.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ts/graphs/future-due.ts b/ts/graphs/future-due.ts index 6515a11c6..1ae73c0bf 100644 --- a/ts/graphs/future-due.ts +++ b/ts/graphs/future-due.ts @@ -40,7 +40,7 @@ export function gatherData(data: pb.BackendProto.GraphsOut): GraphData { let dueDay: number; if (isLearning(c)) { - const offset = c.due - data.nextDayAtSecs + const offset = c.due - data.nextDayAtSecs; dueDay = Math.floor(offset / 86_400) + 1; } else { // - testing just odue fails on day 1 @@ -48,12 +48,11 @@ export function gatherData(data: pb.BackendProto.GraphsOut): GraphData { // have due calculated at regraduation time const due = c.originalDeckId && c.originalDue ? c.originalDue : c.due; dueDay = due - data.daysElapsed; - } haveBacklog = haveBacklog || dueDay < 0; - return dueDay + return dueDay; }); const dueCounts = rollup(