mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 01:24:05 +02:00
make difference calculation stricter
Changed entities with the exact same properties no longer get counted as modified. issue #1287
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user