Skip to content

Commit

Permalink
Update src/app/services/selector_matcher.js
Browse files Browse the repository at this point in the history
We can replace var with const if we conditionally assign here

Co-authored-by: Stu Kilgore <stuart.kilgore@gmail.com>
  • Loading branch information
emmyoop and stu-k authored Jul 5, 2022
1 parent 6984404 commit 39113c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/services/selector_matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@ function getNodesByImplicitSelection(elements, selector) {
var fqn_matched = getNodesByFQN(elements, selector);
var path_matched = getNodesByPath(elements, selector);

var file_matched = [];
if (selector.toLowerCase().endsWith('.sql')) {
file_matched = getNodesByFile(elements, selector);
}
const fileMatched = selector.toLowerCase().endsWith('.sql')
? getNodesByFile(elements, selector)
: [];

var node_ids = _.uniq(
[].concat(
Expand Down

0 comments on commit 39113c4

Please sign in to comment.