Skip to content

Fix element.hasAttributes #868

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

Merged
merged 1 commit into from
Jul 10, 2025
Merged

Fix element.hasAttributes #868

merged 1 commit into from
Jul 10, 2025

Conversation

karlseguin
Copy link
Collaborator

libdom's hasAttributes is based on the type. Elements, according to libdom, always have attributes, thus hasAttributes always return true, even when the element in question has no attribute. Change our _hasAttributes to only return true if the attribute count > 0.

libdom's hasAttributes is based on the type. Elements, according to libdom,
always have attributes, thus hasAttributes always return true, even when the
element in question has no attribute. Change our _hasAttributes to only return
true if the attribute count > 0.
@karlseguin karlseguin merged commit 72083c8 into main Jul 10, 2025
10 checks passed
@karlseguin karlseguin deleted the element_hasAttributes_fix branch July 10, 2025 13:46
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants