From e4fc821eb0f4ef876cd943cb132bfe27fa360655 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 22 Apr 2019 09:49:17 -0400 Subject: [PATCH] Just use reduce --- modules/operations/disconnect.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/operations/disconnect.js b/modules/operations/disconnect.js index a45103d99..fcba4d080 100644 --- a/modules/operations/disconnect.js +++ b/modules/operations/disconnect.js @@ -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()); };