commit bd9c53b29c7ad7d47644c79d732a2a8a2ad339c0
parent 8a93250ca13efdfd58a601afa0b21a384f54ddd4
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 24 May 2015 17:39:27 -0400
Fix tag selector loading (broken by 6b87c641)
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml
@@ -227,10 +227,10 @@
var tagsToggleBox = this.id('tags-toggle');
var tagColors = yield Zotero.Tags.getColors(this.libraryID)
- .tap(() => Zotero.Promise.check(this.item));
+ .tap(() => Zotero.Promise.check(this.mode));
if (fetch || this._dirty) {
this._tags = yield Zotero.Tags.getAll(this.libraryID, this._types)
- .tap(() => Zotero.Promise.check(this.item));
+ .tap(() => Zotero.Promise.check(this.mode));
// Remove children
tagsToggleBox.textContent = "";
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -168,14 +168,14 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
// Add a function to Zotero.Promise to check whether a value is still defined, and if not
// to throw a specific error that's ignored by the unhandled rejection handler in
// bluebird.js. This allows for easily cancelling promises when they're no longer
- // needed, for example after a view is destroyed.
+ // needed, for example after a binding is destroyed.
//
// Example usage:
//
- // getAsync.tap(() => Zotero.Promise.check(this.win))
+ // getAsync.tap(() => Zotero.Promise.check(this.mode))
//
- // If this.win is cleaned up while getAsync() is being resolved, subsequent lines won't
- // be run, and nothing will be logged to the console.
+ // If the binding is destroyed while getAsync() is being resolved and this.mode no longer
+ // exists, subsequent lines won't be run, and nothing will be logged to the console.
this.Promise.check = function (val) {
if (!val && val !== 0) {
let e = new Error;