From 83d11947ffd27fb8712d6ddd61a1f2dd82ac2952 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 11 Jul 2016 06:25:19 -0400 Subject: [PATCH] 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. --- chrome/content/zotero/xpcom/libraryTreeView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/libraryTreeView.js b/chrome/content/zotero/xpcom/libraryTreeView.js index 9dd5cd89d..b35309ff7 100644 --- 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);