From a8575d7c462a01e7d1d5f7791159bc74dd12638f Mon Sep 17 00:00:00 2001 From: Steffen Dienst Date: Wed, 11 Mar 2020 19:50:24 +0100 Subject: [PATCH] fix(#366): always use `Date`s not numbers for custom bar timestamps (#368) Co-authored-by: Yotam Berkowitz --- lib/timeline/Core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index f0bf1572c4..edb0f74e32 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -659,7 +659,7 @@ class Core { */ addCustomTime(time, id) { const timestamp = time !== undefined - ? util.convert(time, 'Date').valueOf() + ? util.convert(time, 'Date') : new Date(); const exists = this.customTimes.some(customTime => customTime.options.id === id);