From 9983c0be433517abe8c222ffda52578539a921fd Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 18 Apr 2013 13:58:22 -0400 Subject: [PATCH] make difference calculation stricter Changed entities with the exact same properties no longer get counted as modified. issue #1287 --- js/id/core/difference.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/id/core/difference.js b/js/id/core/difference.js index 3587fb20b..a55beb934 100644 --- a/js/id/core/difference.js +++ b/js/id/core/difference.js @@ -11,7 +11,7 @@ iD.Difference = function(base, head) { _.each(head.entities, function(h, id) { var b = base.entities[id]; - if (h !== b) { + if (!_.isEqual(h, b)) { changes[id] = {base: b, head: h}; length++; } @@ -19,7 +19,7 @@ iD.Difference = function(base, head) { _.each(base.entities, function(b, id) { var h = head.entities[id]; - if (!changes[id] && h !== b) { + if (!changes[id] && !_.isEqual(h, b)) { changes[id] = {base: b, head: h}; length++; }