commit 1a779bb7aa16e20a3abcd18c505cfecfa1f9c22a
parent e35b035224244e8522c05815ae253ff31ae6d959
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 23 Oct 2017 03:20:35 -0400
Fix "item._changed.creators is undefined" error at startup
This could occur if creator indexes needed to be corrected for an item.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js
@@ -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++;