Just use reduce

This commit is contained in:
Bryan Housel
2019-04-22 09:49:17 -04:00
parent 3557e3c711
commit e4fc821eb0

View File

@@ -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());
};