Discard redundant tags in translator tester
Zotero would discard these anyway when writing to DB. So this makes for more appropriate test cases
This commit is contained in:
parent
424ee72f58
commit
f5cd54620b
1 changed files with 3 additions and 1 deletions
|
@ -257,7 +257,9 @@ Zotero_TranslatorTester._sanitizeItem = function(item, testItem, keepValidFields
|
|||
if(!keepValidFields && "accessDate" in item) delete item.accessDate;
|
||||
|
||||
//sort tags, if they're still there
|
||||
if(item.tags && typeof item.tags === "object" && "sort" in item.tags) item.tags.sort();
|
||||
if(item.tags && typeof item.tags === "object" && "sort" in item.tags) {
|
||||
item.tags = Zotero.Utilities.arrayUnique(item.tags).sort();
|
||||
}
|
||||
|
||||
return item;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue