From 520220a69ac465e87cd14013f9b8b4488c4abde2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 19 Sep 2016 01:01:01 -0400 Subject: [PATCH] Fix #1094, dataObjectUtilities.equals() misdescription --- .../content/zotero/xpcom/data/dataObjectUtilities.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/dataObjectUtilities.js b/chrome/content/zotero/xpcom/data/dataObjectUtilities.js index 478f21cad..62ff5a10b 100644 --- a/chrome/content/zotero/xpcom/data/dataObjectUtilities.js +++ b/chrome/content/zotero/xpcom/data/dataObjectUtilities.js @@ -155,10 +155,12 @@ Zotero.DataObjectUtilities = { /** * Determine whether two API JSON objects are equivalent * + * Note: Currently unused + * * @param {Object} data1 - API JSON of first object * @param {Object} data2 - API JSON of second object * @param {Array} [ignoreFields] - Fields to ignore - * @param {Boolean} - True if objects are the same, false if not + * @return {Boolean} - True if objects are the same, false if not */ equals: function (data1, data2, ignoreFields) { var skipFields = {}; @@ -182,7 +184,7 @@ Zotero.DataObjectUtilities = { let changed = this._fieldChanged(field, val1, val2); if (changed) { - return true; + return false; } skipFields[field] = true; @@ -200,10 +202,10 @@ Zotero.DataObjectUtilities = { continue; } - return true; + return false; } - return false; + return true; }, _fieldChanged: function (fieldName, field1, field2) {