From afface4fba09fe395174ac909db68904b49d8791 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 7 May 2015 15:07:58 -0400 Subject: [PATCH] Fix Zotero.Utilities.arrayEquals() for nested array comparisons --- chrome/content/zotero/xpcom/utilities.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 0f19646bc5..4edb19afc8 100644 --- 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}