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:
parent
e35b035224
commit
1a779bb7aa
1 changed files with 3 additions and 0 deletions
|
@ -333,6 +333,9 @@ Zotero.Items = function() {
|
||||||
Zotero.debug("Fixing incorrect creator indexes for item " + item.libraryKey
|
Zotero.debug("Fixing incorrect creator indexes for item " + item.libraryKey
|
||||||
+ " (" + numCreators + ", " + maxOrderIndex + ")", 2);
|
+ " (" + numCreators + ", " + maxOrderIndex + ")", 2);
|
||||||
var i = numCreators;
|
var i = numCreators;
|
||||||
|
if (!item._changed.creators) {
|
||||||
|
item._changed.creators = {};
|
||||||
|
}
|
||||||
while (i <= maxOrderIndex) {
|
while (i <= maxOrderIndex) {
|
||||||
item._changed.creators[i] = true;
|
item._changed.creators[i] = true;
|
||||||
i++;
|
i++;
|
||||||
|
|
Loading…
Reference in a new issue