From f5cd54620b0354c8e41e111276fb75073938490e Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Wed, 18 Feb 2015 22:39:04 -0600 Subject: [PATCH] Discard redundant tags in translator tester Zotero would discard these anyway when writing to DB. So this makes for more appropriate test cases --- .../content/zotero/tools/testTranslators/translatorTester.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/tools/testTranslators/translatorTester.js b/chrome/content/zotero/tools/testTranslators/translatorTester.js index ac4c6c4996..03a5185094 100644 --- a/chrome/content/zotero/tools/testTranslators/translatorTester.js +++ b/chrome/content/zotero/tools/testTranslators/translatorTester.js @@ -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; };