mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 17:14:04 +02:00
Fix mutation of childNodes array
This commit is contained in:
@@ -84,6 +84,8 @@ iD.Graph.prototype = {
|
||||
nodes[i] = this.entity(entity.nodes[i]);
|
||||
}
|
||||
|
||||
if (iD.debug) Object.freeze(nodes);
|
||||
|
||||
this._childNodes[entity.id] = nodes;
|
||||
return this._childNodes[entity.id];
|
||||
},
|
||||
|
||||
@@ -87,7 +87,7 @@ iD.geo.joinWays = function(array, graph) {
|
||||
while (array.length) {
|
||||
member = array.shift();
|
||||
current = [member];
|
||||
current.nodes = nodes = resolve(member);
|
||||
current.nodes = nodes = resolve(member).slice();
|
||||
joined.push(current);
|
||||
|
||||
while (array.length && _.first(nodes) !== _.last(nodes)) {
|
||||
|
||||
Reference in New Issue
Block a user