Fix 'this' binding in ZoteroPane.selectItem(), but this time for real

This commit is contained in:
Dan Stillman 2015-04-26 02:40:52 -04:00
parent a2b572665d
commit 1f00e99e71

View file

@ -2024,16 +2024,16 @@ var ZoteroPane = new function()
if (!selected) {
if (item.deleted) {
Zotero.debug("Item is deleted; switching to trash");
this.collectionsView.selectTrash(item.libraryID);
self.collectionsView.selectTrash(item.libraryID);
}
else {
Zotero.debug("Item was not selected; switching to library");
yield this.collectionsView.selectLibrary(item.libraryID);
yield self.collectionsView.selectLibrary(item.libraryID);
}
yield self.itemsView.selectItem(itemID, expand);
}
deferred.resolve(true);
}, this)
})
.catch(function(e) {
deferred.reject(e);
});