Fix removal of creators when changing to item type without creators
This shouldn't actually be used currently, since only notes and attachments lack creators and it shouldn't be possible to change regular items into notes or attachments.
This commit is contained in:
parent
c4aad9a041
commit
3247391914
1 changed files with 2 additions and 1 deletions
|
@ -499,10 +499,11 @@ Zotero.Item.prototype.setType = function(itemTypeID, loadIn) {
|
|||
let creators = this.getCreators();
|
||||
if (creators.length) {
|
||||
let removeAll = !Zotero.CreatorTypes.itemTypeHasCreators(itemTypeID);
|
||||
for (let i=0; i<creators.length; i++) {
|
||||
for (let i = 0; i < this.getCreators().length; i++) {
|
||||
// Remove all creators if new item type doesn't have any
|
||||
if (removeAll) {
|
||||
this.removeCreator(i);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue