Remove lodash clone

(re: #6087)
This commit is contained in:
Bryan Housel
2019-03-22 23:18:25 -04:00
parent ff4f8f005f
commit 0e90167513
28 changed files with 82 additions and 135 deletions
+4 -5
View File
@@ -1,4 +1,3 @@
import _clone from 'lodash-es/clone';
import _forEach from 'lodash-es/forEach';
import _isEqual from 'lodash-es/isEqual';
import _unionBy from 'lodash-es/unionBy';
@@ -93,7 +92,7 @@ export function uiCommit(context) {
_changeset = new osmChangeset({ tags: tags });
}
tags = _clone(_changeset.tags);
tags = Object.assign({}, _changeset.tags); // shallow copy
// assign tags for imagery used
var imageryUsed = context.history().imageryUsed().join(';').substr(0, 255);
@@ -316,7 +315,7 @@ export function uiCommit(context) {
.call(rawTagEditor
.expanded(expanded)
.readOnlyTags(readOnlyTags)
.tags(_clone(_changeset.tags))
.tags(Object.assign({}, _changeset.tags)) // shallow copy
);
@@ -333,7 +332,7 @@ export function uiCommit(context) {
.call(rawTagEditor
.expanded(expanded)
.readOnlyTags(readOnlyTags)
.tags(_clone(_changeset.tags))
.tags(Object.assign({}, _changeset.tags)) // shallow copy
);
}
}
@@ -424,7 +423,7 @@ export function uiCommit(context) {
function updateChangeset(changed, onInput) {
var tags = _clone(_changeset.tags);
var tags = Object.assign({}, _changeset.tags); // shallow copy
_forEach(changed, function(v, k) {
k = k.trim().substr(0, 255);