Skip to content

Commit

Permalink
pull lowercasing out of class matcher (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Mar 7, 2023
1 parent 7d1f669 commit 909bea6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions esquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,16 @@ function generateMatcher(selector) {
}

case 'class': {

const name = selector.name.toLowerCase();

return (node, ancestry, options) => {

if (options && options.matchClass) {
return options.matchClass(selector.name, node, ancestry);
}

if (options && options.nodeTypeKey) return false;

const name = selector.name.toLowerCase();
if (options && options.nodeTypeKey) return false;

switch(name){
case 'statement':
Expand Down

0 comments on commit 909bea6

Please sign in to comment.