|
|
@ -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; |
|
|
@ -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); |
|
|
|