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:
Bryan Housel
2018-12-12 02:07:03 -05:00
parent c635389c1a
commit 84f96574d7
+1 -1
View File
@@ -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;