Fix UI breakage that prevents switching collections

I'll add a test later once I figure out how to reproduce this, but I
think this should fix the "id is undefined" errors.
This commit is contained in:
Dan Stillman 2016-07-11 06:25:19 -04:00
parent 2ebd7bd114
commit 83d11947ff

View File

@ -130,7 +130,7 @@ Zotero.LibraryTreeView.prototype = {
* Restore a scroll position returned from _saveScrollPosition()
*/
_rememberScrollPosition: function (scrollPosition) {
if (!scrollPosition) {
if (!scrollPosition || !scrollPosition.id) {
return;
}
var row = this.getRowIndexByID(scrollPosition.id);