Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Small bugfix in ItemSet._onUpdate() which caused a nullpointer in Ite… #2116

Merged
merged 1 commit into from
Sep 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/timeline/component/ItemSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ ItemSet.prototype._onUpdate = function(ids) {
ids.forEach(function (id) {
var itemData = me.itemsData.get(id, me.itemOptions);
var item = me.items[id];
var type = me._getType(itemData);
var type = itemData ? me._getType(itemData) : null;

var constructor = ItemSet.types[type];
var selected;
Expand All @@ -898,7 +898,7 @@ ItemSet.prototype._onUpdate = function(ids) {
}
}

if (!item) {
if (!item && itemData) {
// create item
if (constructor) {
item = new constructor(itemData, me.conversion, me.options);
Expand Down