www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c701f34aaa935766a851963e25afb4c889a1937b
parent e683b2be07b3220a610089e765674c0429515c89
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 11 Jul 2017 02:41:41 -0400

Fix array length check in Item.setType()

Diffstat:
Mchrome/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 @@ -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<creators.length; i++) { // Remove all creators if new item type doesn't have any