Fixes #1157, Adding an existing tag to an item with no tags breaks Zotero
This commit is contained in:
parent
f0c4eec238
commit
d5bf5c9120
|
@ -2664,8 +2664,8 @@ Zotero.Item.prototype.addTag = function(name, type) {
|
|||
Zotero.DB.beginTransaction();
|
||||
|
||||
var matchingTags = Zotero.Tags.getIDs(name);
|
||||
if (matchingTags) {
|
||||
var itemTags = this.getTags();
|
||||
var itemTags = this.getTags();
|
||||
if (matchingTags && itemTags) {
|
||||
for each(var id in matchingTags) {
|
||||
if (itemTags.indexOf(id) != -1) {
|
||||
var tag = Zotero.Tags.get(id);
|
||||
|
|
Loading…
Reference in New Issue
Block a user