From cb0140381e0cd9c5d7ed04d3d0cc9d59bfc7b109 Mon Sep 17 00:00:00 2001 From: sanke1 <22073083+sankerust@users.noreply.github.com> Date: Tue, 11 Sep 2018 18:56:08 +0300 Subject: [PATCH] use current date instead if last labeled segment + diff (#143) --- server/src/controllers/analytics_controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/controllers/analytics_controller.ts b/server/src/controllers/analytics_controller.ts index 3681bc6..0098a8a 100644 --- a/server/src/controllers/analytics_controller.ts +++ b/server/src/controllers/analytics_controller.ts @@ -82,7 +82,7 @@ function getQueryRangeForLearningBySegments(segments: Segment.Segment[]) { let to = _.maxBy(segments, s => s.to).to; let diff = to - from; from -= Math.round(diff); - to += Math.round(diff); + to = Date.now(); return { from, to }; }