Fix error in console on feed update before pane open

This commit is contained in:
Dan Stillman 2016-05-26 00:34:25 -04:00
parent e4bc4c028d
commit d7e38d960e

View file

@ -318,13 +318,6 @@ Zotero.CollectionTreeView.prototype.selectWait = Zotero.Promise.method(function
* Called by Zotero.Notifier on any changes to collections in the data layer
*/
Zotero.CollectionTreeView.prototype.notify = Zotero.Promise.coroutine(function* (action, type, ids, extraData) {
if (type == 'feed' && (action == 'unreadCountUpdated' || action == 'statusChanged')) {
for (let i=0; i<ids.length; i++) {
this._treebox.invalidateRow(this._rowMap['L' + ids[i]]);
}
return;
}
if ((!ids || ids.length == 0) && action != 'refresh' && action != 'redraw') {
return;
}
@ -357,6 +350,12 @@ Zotero.CollectionTreeView.prototype.notify = Zotero.Promise.coroutine(function*
}
return;
}
if (type == 'feed' && (action == 'unreadCountUpdated' || action == 'statusChanged')) {
for (let i=0; i<ids.length; i++) {
this._treebox.invalidateRow(this._rowMap['L' + ids[i]]);
}
return;
}
//
// Actions that can change the selection