You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportfunctionButton(){return(<buttonclassName={style.className}onClick={function(){if(activeTheme=="light"){updateTheme(themes.dark)}else{updateTheme(themes.light)}}}>
Change the theme
</button></>)}
Given the following query
(jsx_opening_element
"<" @operator
">" @operator)
The query weirdly yields no matches for the <button> element due to the if-else function inside of the onClick attribute. Removing the else statement seems to fix the problem.
EDIT: Seems to be a more general problem with any two or more expressions inside of the function's body.
I'm going to close this out actually, and ask you to subscribe to tree-sitter/tree-sitter#634 instead. I will verify that this specific case is fixed before closing that issue.
Example code
Given the following query
The query weirdly yields no matches for the
<button>
element due to the if-else function inside of theonClick
attribute. Removing theelse
statement seems to fix the problem.EDIT: Seems to be a more general problem with any two or more expressions inside of the function's body.
i.e.
also reproduces in the same problem
The text was updated successfully, but these errors were encountered: