From eef693113e54c7acb94dd9db187a31be8e305c47 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 11 Jun 2015 09:20:33 +0200 Subject: [PATCH] Fixed #942: bug when data is empty --- HISTORY.md | 9 ++++++++- lib/timeline/Core.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index f11a9ef0..719bc9ff 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,7 +1,14 @@ # vis.js history http://visjs.org -## not-yet-released, version 4.1.1-SNAPSHOT +## not-yet released, version 4.2.1-SNAPSHOT + +### Graph2d + +- Fixed #942: bug when data is empty. + + +## 2015-06-05, version 4.2.0 ### General diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 7ea5a50f..e9176360 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -460,7 +460,7 @@ Core.prototype.fit = function(options) { var range = this.getDataRange(); // skip range set if there is no start and end date - if (range.start === null && range.end === null) { + if (range.min === null && range.max === null) { return; }