From f6b7acf9ed59adcc969395d650f55cd5bafd2955 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 25 Feb 2014 10:03:48 -0800 Subject: [PATCH] Remove conditional that's always true The base graph never has any ownProperty entities. --- js/id/core/history.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/id/core/history.js b/js/id/core/history.js index f71365d37..2ca81bc8b 100644 --- a/js/id/core/history.js +++ b/js/id/core/history.js @@ -189,10 +189,12 @@ iD.History = function(context) { } else { deleted.push(id); } + // make sure that the originals of changed or deleted entities get merged // into the base of the stack after restoring the data from JSON. - if (id in base.graph.entities && !base.graph.entities.hasOwnProperty(id)) + if (id in base.graph.entities) { baseEntities[id] = base.graph.entities[id]; + } }); var x = {};