Fix array length check in Item.setType()
This commit is contained in:
parent
e683b2be07
commit
c701f34aaa
|
@ -496,7 +496,7 @@ Zotero.Item.prototype.setType = function(itemTypeID, loadIn) {
|
||||||
if (oldItemTypeID) {
|
if (oldItemTypeID) {
|
||||||
// Reset custom creator types to the default
|
// Reset custom creator types to the default
|
||||||
let creators = this.getCreators();
|
let creators = this.getCreators();
|
||||||
if (creators) {
|
if (creators.length) {
|
||||||
let removeAll = !Zotero.CreatorTypes.itemTypeHasCreators(itemTypeID);
|
let removeAll = !Zotero.CreatorTypes.itemTypeHasCreators(itemTypeID);
|
||||||
for (let i=0; i<creators.length; i++) {
|
for (let i=0; i<creators.length; i++) {
|
||||||
// Remove all creators if new item type doesn't have any
|
// Remove all creators if new item type doesn't have any
|
||||||
|
|
Loading…
Reference in New Issue
Block a user