commit 5816e586fe7e8bf265f5e1d5c6c9f7bac0fca52d
parent e3ce3bf0c431cc0f0b761812bc6c58165d03c3ad
Author: aurimasv <aurimas.dev@gmail.com>
Date: Thu, 8 Mar 2012 02:34:38 -0600
Sort arrays before comparing them. Tag order does not matter and authors will not be sorted.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/tools/testTranslators/translatorTester.js b/chrome/content/zotero/tools/testTranslators/translatorTester.js
@@ -574,6 +574,8 @@ Zotero_TranslatorTester.prototype._compare = function(i, j) {
var match = false;
if (Object.prototype.toString.apply(i) === '[object Array]') {
if (Object.prototype.toString.apply(j) === '[object Array]') {
+ i.sort();
+ j.sort();
do {
match = this._compare(i.pop(), j.pop());
} while (match && i.length && j.length);