www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 96f5bab3a1eded0bc519682564c123be5af7bab6
parent 31af26af08e8a029279d868a065a0569f513482b
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 25 May 2015 21:47:20 -0400

Cancel relatedbox loading if binding disappears

Diffstat:
Mchrome/content/zotero/bindings/relatedbox.xml | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/bindings/relatedbox.xml b/chrome/content/zotero/bindings/relatedbox.xml @@ -78,10 +78,12 @@ var r = ""; if (this.item) { - yield this.item.loadRelations(); + yield this.item.loadRelations() + .tap(() => Zotero.Promise.check(this.item)); var related = this.item.relatedItems; if (related) { - related = yield Zotero.Items.getAsync(related); + related = yield Zotero.Items.getAsync(related) + .tap(() => Zotero.Promise.check(this.item)); for(var i = 0; i < related.length; i++) { r = r + related[i].getDisplayTitle() + ", "; } @@ -106,10 +108,12 @@ rows.removeChild(rows.firstChild); if (this.item) { - yield this.item.loadRelations(); + yield this.item.loadRelations() + .tap(() => Zotero.Promise.check(this.item)); var related = this.item.relatedItems; if (related) { - related = yield Zotero.Items.getAsync(related); + related = yield Zotero.Items.getAsync(related) + .tap(() => Zotero.Promise.check(this.item)); for (var i = 0; i < related.length; i++) { var icon= document.createElement("image"); icon.className = "zotero-box-icon";