Fix error when sorting by Item Type column (since dd477e15b8
)
This commit is contained in:
parent
ebb112890d
commit
fd9452adbc
2 changed files with 5 additions and 1 deletions
|
@ -379,7 +379,8 @@ Zotero.ItemFields = new function() {
|
|||
function _fieldCheck(field, func) {
|
||||
var fieldID = self.getID(field);
|
||||
if (!fieldID) {
|
||||
throw ("Invalid field '" + field + (func ? "' in ItemFields." + func + "()" : "'"));
|
||||
Zotero.debug((new Error).stack, 1);
|
||||
throw new Error("Invalid field '" + field + (func ? "' in ItemFields." + func + "()" : "'"));
|
||||
}
|
||||
return fieldID;
|
||||
}
|
||||
|
|
|
@ -300,6 +300,9 @@ Zotero.Items = new function() {
|
|||
if (this.isPrimaryField(field)) {
|
||||
primaryFields.push(field);
|
||||
}
|
||||
else if (field == 'itemType') {
|
||||
primaryFields.push('itemTypeID');
|
||||
}
|
||||
else {
|
||||
fieldIDs.push(Zotero.ItemFields.getID(field));
|
||||
if (Zotero.ItemFields.isBaseField(field)) {
|
||||
|
|
Loading…
Reference in a new issue