From 9c53fe893cb2d977bec26823bf4b982d67487791 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 9 Apr 2016 18:30:45 -0400 Subject: [PATCH] Skip collectionTreeView::notify() actions if no selection I think this only happens if the Zotero pane hasn't yet been opened, which also means an initial refresh() hasn't been done, which means that updates aren't necessary. --- chrome/content/zotero/xpcom/collectionTreeView.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index 41d5a345a..5b112717d 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -332,6 +332,11 @@ Zotero.CollectionTreeView.prototype.notify = Zotero.Promise.coroutine(function* return; } + if (!this.selection) { + Zotero.debug("Selection didn't exist in collectionTreeView.notify()"); + return; + } + // // Actions that don't change the selection //