mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
Fixed an entity not found error when restoring new ways that reference unloaded nodes (closed #4108, closed #5194)
This commit is contained in:
@@ -417,6 +417,14 @@ export function coreHistory(context) {
|
||||
if (id in base.graph.entities) {
|
||||
baseEntities[id] = base.graph.entities[id];
|
||||
}
|
||||
if (entity && entity.nodes) {
|
||||
// get originals of pre-existing child nodes
|
||||
_forEach(entity.nodes, function(nodeId) {
|
||||
if (nodeId in base.graph.entities) {
|
||||
baseEntities[nodeId] = base.graph.entities[nodeId];
|
||||
}
|
||||
});
|
||||
}
|
||||
// get originals of parent entities too
|
||||
_forEach(base.graph._parentWays[id], function(parentId) {
|
||||
if (parentId in base.graph.entities) {
|
||||
|
||||
Reference in New Issue
Block a user