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

fix: On empty className w/ compat, class attr will no longer be duplicated #209

Merged
merged 3 commits into from Dec 16, 2021

Conversation

rschristian
Copy link
Member

Fixes #208

Empty props.class wouldn't be truthy, resulting in class being added to the element twice as outlined in the attached issue.

The added test might be a bit overkill, but it seems Mocha has no support for test isolation. Importing preact/compat (even in other suites) would throw off one of the existing tests, so I just run the compat suite subsequently. Let me know if there's a better way to go about this.

@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2021

🦋 Changeset detected

Latest commit: 298d05e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-render-to-string Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@marvinhagemeister marvinhagemeister merged commit 63bde4b into master Dec 16, 2021
@marvinhagemeister marvinhagemeister deleted the fix/compat-empty-classname branch December 16, 2021 11:09
@github-actions github-actions bot mentioned this pull request Dec 16, 2021
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.

Empty class attribute duplicated with preact/compat and SSR
3 participants