Fix "item._changed.creators is undefined" error at startup

This could occur if creator indexes needed to be corrected for an item.
This commit is contained in:
Dan Stillman 2017-10-23 03:20:35 -04:00
parent e35b035224
commit 1a779bb7aa

View file

@ -333,6 +333,9 @@ Zotero.Items = function() {
Zotero.debug("Fixing incorrect creator indexes for item " + item.libraryKey
+ " (" + numCreators + ", " + maxOrderIndex + ")", 2);
var i = numCreators;
if (!item._changed.creators) {
item._changed.creators = {};
}
while (i <= maxOrderIndex) {
item._changed.creators[i] = true;
i++;