www

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

commit b9cc4496b96a68fce3196450741f11a2e64c2dc3
parent 9c92f50fab89ae6254833143f20faffd2eb70171
Author: aurimasv <aurimas.dev@gmail.com>
Date:   Mon, 12 Nov 2012 11:43:51 -0600

Fix translator tester

Diffstat:
Mchrome/content/zotero/tools/testTranslators/translatorTester.js | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/tools/testTranslators/translatorTester.js b/chrome/content/zotero/tools/testTranslators/translatorTester.js @@ -422,7 +422,11 @@ Zotero_TranslatorTester.prototype.runTest = function(test, doc, testDoneCallback var newItems = {}; var haveItems = false; for(var i in items) { - newItems[i] = items[i]; + if(items[i] && typeof(items[i]) == "object" && items[i].title !== undefined) { + newItems[i] = items[i].title; + } else { + newItems[i] = items[i]; + } haveItems = true; // only save one item if "items":"multiple" (as opposed to an array of items) @@ -546,7 +550,11 @@ Zotero_TranslatorTester.prototype.newTest = function(doc, testReadyCallback) { var newItems = {}; for(var i in items) { - newItems[i] = items[i]; + if(items[i] && typeof(items[i]) == "object" && items[i].title !== undefined) { + newItems[i] = items[i].title; + } else { + newItems[i] = items[i]; + } break; }