Fix sorting of attachments and notes columns

Regression from a8ed30ce80
This commit is contained in:
Dan Stillman 2022-07-10 23:26:07 -04:00
parent 3ab661b628
commit e25ec0d981

View file

@ -1873,11 +1873,17 @@ var ItemTree = class ItemTree extends LibraryTree {
}
_isValidSortField(field) {
return field == 'itemType'
|| field == 'year'
|| field == 'id' // feeds
|| !!Zotero.ItemFields.getID(field)
|| Zotero.Items.primaryFields.includes(field);
switch (field) {
// Non-standard columns
case 'itemType':
case 'year':
case 'hasAttachment':
case 'numNotes':
// Feed items
case 'id':
return true;
}
return !!Zotero.ItemFields.getID(field) || Zotero.Items.primaryFields.includes(field);
}
/**