Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean getMatchingElement #47

Merged
merged 4 commits into from
Aug 20, 2024
Merged

Clean getMatchingElement #47

merged 4 commits into from
Aug 20, 2024

Conversation

fregante
Copy link
Collaborator

@fregante fregante commented Aug 20, 2024

Nitpicks only:

  • getMatchingElement requires target and selector, so = {} cannot be used
  • [...x].find() loops twice and creates a function
  • querySelector() and therefore getMatchingElement return | null. This was addressed later in the code, but null should be eliminated immediately

@sindresorhus sindresorhus merged commit 9517124 into main Aug 20, 2024
2 checks passed
@sindresorhus sindresorhus deleted the getMatchingElement branch August 20, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants