Browse Source

use current date instead if last labeled segment + diff (#143)

pull/1/head
sanke1 6 years ago committed by Alexey Velikiy
parent
commit
cb0140381e
  1. 2
      server/src/controllers/analytics_controller.ts

2
server/src/controllers/analytics_controller.ts

@ -82,7 +82,7 @@ function getQueryRangeForLearningBySegments(segments: Segment.Segment[]) {
let to = _.maxBy(segments, s => s.to).to; let to = _.maxBy(segments, s => s.to).to;
let diff = to - from; let diff = to - from;
from -= Math.round(diff); from -= Math.round(diff);
to += Math.round(diff); to = Date.now();
return { from, to }; return { from, to };
} }

Loading…
Cancel
Save