Fix error trying to toggle colored tag with no tag
(This should be fixed so that the setting is always removed, though.)
This commit is contained in:
parent
e20bd35756
commit
d60b0221db
|
@ -635,7 +635,12 @@ Zotero.Tags = new function() {
|
|||
this.toggleItemsListTags = function (libraryID, items, name) {
|
||||
var self = this;
|
||||
return Q.fcall(function () {
|
||||
var tagIDs = self.getIDs(name, libraryID);
|
||||
var tagIDs = self.getIDs(name, libraryID) || [];
|
||||
// If there's a color setting but no matching tag, don't throw
|
||||
// an error (though ideally this wouldn't be possible).
|
||||
if (!tagIDs.length) {
|
||||
return;
|
||||
}
|
||||
var tags = tagIDs.map(function (tagID) {
|
||||
return Zotero.Tags.get(tagID, true);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user