mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Add index property to cloned object, not actual member object
(closes #5458) This code was adding an `index` property to each member in the relation. Although the `index` property is ignored by the code that saves to OSM, the extra property would make the member changed when compared by `coreDifference`.
This commit is contained in:
@@ -189,7 +189,7 @@ export function actionAddMember(relationId, member, memberIndex, insertPair) {
|
||||
function withIndex(arr) {
|
||||
var result = new Array(arr.length);
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
result[i] = arr[i];
|
||||
result[i] = _clone(arr[i]);
|
||||
result[i].index = i;
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user