From 9d452c9ffe23689b6a740754170bf97253fc5cdd Mon Sep 17 00:00:00 2001 From: J Guthrie Date: Sun, 24 Feb 2019 01:20:34 +0000 Subject: [PATCH] Fix lint issue --- modules/operations/straighten.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/operations/straighten.js b/modules/operations/straighten.js index d06fc0375..3323539ee 100644 --- a/modules/operations/straighten.js +++ b/modules/operations/straighten.js @@ -43,9 +43,12 @@ export function operationStraighten(selectedIDs, context) { } // Remove duplicate end/startNodes (duplicate nodes cannot be at the line end) - // i.e. ["n-1", "n-1", "n-2"] => ["n-2"] - startNodes = startNodes.filter(n => startNodes.indexOf(n) == startNodes.lastIndexOf(n)); - endNodes = endNodes.filter(n => endNodes.indexOf(n) == endNodes.lastIndexOf(n)); + startNodes = _filter(startNodes, function(n) { + return startNodes.indexOf(n) == startNodes.lastIndexOf(n); + }); + endNodes = _filter(endNodes, function(n) { + return endNodes.indexOf(n) == endNodes.lastIndexOf(n); + }); // Return false if line is only 2 nodes long // Return false unless exactly 0 or 2 specific nodes are selected