commit afface4fba09fe395174ac909db68904b49d8791
parent 94f968ae577501f78244d81846e0241af0c26460
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 7 May 2015 15:07:58 -0400
Fix Zotero.Utilities.arrayEquals() for nested array comparisons
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
@@ -655,8 +655,9 @@ Zotero.Utilities = {
// Check if we have nested arrays
if (array1[i] instanceof Array && array2[i] instanceof Array) {
// Recurse into the nested arrays
- if (!array1[i].compare(array2[i]))
+ if (!this.arrayEquals(array1[i], array2[i])) {
return false;
+ }
}
else if (array1[i] != array2[i]) {
// Warning - two different object instances will never be equal: {x:20} != {x:20}