mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
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
1 changed files with 6 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue