Don't save null tags to server

This commit is contained in:
Simon Kornblith 2012-08-05 19:44:04 -04:00
parent bacd25633b
commit c57f512aea

View file

@ -1218,7 +1218,7 @@ Zotero.Utilities = {
} else if(field === "tags") {
// normalize tags
var n = val.length;
var newTags = newItem.tags = new Array(n);
var newTags = newItem.tags = [];
for(var j=0; j<n; j++) {
var tag = val[j];
if(typeof tag === "object") {
@ -1233,7 +1233,7 @@ Zotero.Utilities = {
} else if(tag === "") {
continue;
}
newTags[j] = {"tag":tag.toString(), "type":1};
newTags.push({"tag":tag.toString(), "type":1});
}
} else if(field === "notes") {
// normalize notes