From c701f34aaa935766a851963e25afb4c889a1937b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 11 Jul 2017 02:41:41 -0400 Subject: [PATCH] Fix array length check in Item.setType() --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 4b0d4e5c80..acf7609c29 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -496,7 +496,7 @@ Zotero.Item.prototype.setType = function(itemTypeID, loadIn) { if (oldItemTypeID) { // Reset custom creator types to the default let creators = this.getCreators(); - if (creators) { + if (creators.length) { let removeAll = !Zotero.CreatorTypes.itemTypeHasCreators(itemTypeID); for (let i=0; i