From 9dd5ccdd4e99e8c4b7b70f8d6ed56f49ac073c35 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 6 Aug 2019 08:01:49 -0700 Subject: [PATCH] Letters are cheap, lets use more of them --- modern/src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modern/src/utils.js b/modern/src/utils.js index 1113c883..acc6f406 100644 --- a/modern/src/utils.js +++ b/modern/src/utils.js @@ -148,7 +148,7 @@ function findDirectDescendantById(node, id) { } // Search up the tree for a node that is in `node`'s lexical scope and pred returns node -function findInLexicalScope(node, pred) { +function findInLexicalScope(node, predicate) { let currentNode = node; while (currentNode.parent) { const parent = currentNode.parent; @@ -159,7 +159,7 @@ function findInLexicalScope(node, pred) { break; } - const item = pred(child); + const item = predicate(child); if (item) { return item; }