Make missing row in itemTreeView::getSelectedItems() non-fatal
This might help avoid the search bar brokenness that people are seeing (and that we can't reproduce), though the same problem might just cause a later error.
This commit is contained in:
parent
f75d7313dd
commit
4eb18e5eba
1 changed files with 5 additions and 5 deletions
|
@ -1979,12 +1979,12 @@ Zotero.ItemTreeView.prototype.getSelectedItems = function(asIDs)
|
||||||
{
|
{
|
||||||
this.selection.getRangeAt(i,start,end);
|
this.selection.getRangeAt(i,start,end);
|
||||||
for (var j=start.value; j<=end.value; j++) {
|
for (var j=start.value; j<=end.value; j++) {
|
||||||
if (asIDs) {
|
let row = this.getRow(j);
|
||||||
items.push(this.getRow(j).id);
|
if (!row) {
|
||||||
}
|
Zotero.logError(`Row ${j} not found`);
|
||||||
else {
|
continue;
|
||||||
items.push(this.getRow(j).ref);
|
|
||||||
}
|
}
|
||||||
|
items.push(asIDs ? row.id : row.ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return items;
|
return items;
|
||||||
|
|
Loading…
Reference in a new issue