Return array copy in ItemFields.getItemTypeFields()/getTypeFieldsFromBase()

This commit is contained in:
Dan Stillman 2017-02-02 18:42:17 -05:00
parent 7ede52355d
commit 79a07cad9e

View File

@ -204,7 +204,7 @@ Zotero.ItemFields = new function() {
throw new Error("Item type field data not found for itemTypeID " + itemTypeID); throw new Error("Item type field data not found for itemTypeID " + itemTypeID);
} }
return _itemTypeFields[itemTypeID]; return [..._itemTypeFields[itemTypeID]];
} }
@ -317,7 +317,7 @@ Zotero.ItemFields = new function() {
} }
return _typeFieldIDsByBase[baseFieldID] ? return _typeFieldIDsByBase[baseFieldID] ?
_typeFieldIDsByBase[baseFieldID] : false; [..._typeFieldIDsByBase[baseFieldID]] : false;
} }