Fix tag selector loading (broken by 6b87c641)

This commit is contained in:
Dan Stillman 2015-05-24 17:39:27 -04:00
parent 8a93250ca1
commit bd9c53b29c
2 changed files with 6 additions and 6 deletions

View file

@ -227,10 +227,10 @@
var tagsToggleBox = this.id('tags-toggle'); var tagsToggleBox = this.id('tags-toggle');
var tagColors = yield Zotero.Tags.getColors(this.libraryID) var tagColors = yield Zotero.Tags.getColors(this.libraryID)
.tap(() => Zotero.Promise.check(this.item)); .tap(() => Zotero.Promise.check(this.mode));
if (fetch || this._dirty) { if (fetch || this._dirty) {
this._tags = yield Zotero.Tags.getAll(this.libraryID, this._types) this._tags = yield Zotero.Tags.getAll(this.libraryID, this._types)
.tap(() => Zotero.Promise.check(this.item)); .tap(() => Zotero.Promise.check(this.mode));
// Remove children // Remove children
tagsToggleBox.textContent = ""; tagsToggleBox.textContent = "";

View file

@ -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 // 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 // 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 // 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: // 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 // If the binding is destroyed while getAsync() is being resolved and this.mode no longer
// be run, and nothing will be logged to the console. // exists, subsequent lines won't be run, and nothing will be logged to the console.
this.Promise.check = function (val) { this.Promise.check = function (val) {
if (!val && val !== 0) { if (!val && val !== 0) {
let e = new Error; let e = new Error;