www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit a9bc55738a925abfc043a4d403bd1402b41f4c95
parent d0a9108d92375ce7b56e1b7889930a86fd304ce3
Author: Simon Kornblith <simon@simonster.com>
Date:   Sat, 10 Mar 2012 13:10:43 -0800

Merge pull request #73 from aurimasv/tester

Ignore order when comparing arrays in translatorTester
Diffstat:
Mchrome/content/zotero/tools/testTranslators/translatorTester.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/tools/testTranslators/translatorTester.js b/chrome/content/zotero/tools/testTranslators/translatorTester.js @@ -220,7 +220,9 @@ Zotero_TranslatorTester._sanitizeItem = function(item, forSave) { const skipFields = ["note", "notes", "itemID", "attachments", "tags", "seeAlso", "itemType", "complete", "creators"]; for(var field in item) { - if(skipFields.indexOf(field) !== -1) continue; + if(skipFields.indexOf(field) !== -1) { + continue; + } if(!item[field] || !(fieldID = Zotero.ItemFields.getID(field))) { delete item[field]; @@ -241,6 +243,9 @@ Zotero_TranslatorTester._sanitizeItem = function(item, forSave) { // remove fields to be ignored if("accessDate" in item) delete item.accessDate; + + //sort tags, if they're still there + if(item.tags) item.tags.sort(); return item; };