mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Just use reduce
This commit is contained in:
@@ -55,10 +55,7 @@ export function operationDisconnect(selectedIDs, context) {
|
||||
|
||||
var operation = function() {
|
||||
context.perform(function(graph) {
|
||||
actions.forEach(function(action) {
|
||||
graph = action(graph);
|
||||
});
|
||||
return graph;
|
||||
return actions.reduce(function(graph, action) { return action(graph); }, graph);
|
||||
}, operation.annotation());
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user