From e82a95fd142ac7a67abfe629934446f063eff22a Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 13 Aug 2014 10:17:51 +0200 Subject: [PATCH] Fixed a group "null" being displayed in IE when not using groups (see also #238) --- HISTORY.md | 1 + lib/timeline/component/Group.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index ea5f2066..c38167f0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -18,6 +18,7 @@ http://visjs.org ### Timeline - Fixed items in groups sometimes being displayed but not positioned correctly. +- Fixed a group "null" being displayed in IE when not using groups. ### Network diff --git a/lib/timeline/component/Group.js b/lib/timeline/component/Group.js index 3ca823e3..c4ebc69b 100644 --- a/lib/timeline/component/Group.js +++ b/lib/timeline/component/Group.js @@ -78,11 +78,11 @@ Group.prototype.setData = function(data) { if (content instanceof Element) { this.dom.inner.appendChild(content); } - else if (content != undefined) { + else if (content !== undefined && content !== null) { this.dom.inner.innerHTML = content; } else { - this.dom.inner.innerHTML = this.groupId; + this.dom.inner.innerHTML = this.groupId || ''; // groupId can be null } // update title