commit 83d11947ffd27fb8712d6ddd61a1f2dd82ac2952
parent 2ebd7bd11440d0c8d4e7ff68c2e8c9161bee7ad5
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 11 Jul 2016 06:25:19 -0400
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/libraryTreeView.js b/chrome/content/zotero/xpcom/libraryTreeView.js
@@ -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);