Skip to content

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

@rschristian rschristian force-pushed the fix/compat-empty-classname branch from dde49d6 to 298d05e Compare December 15, 2021 10:02
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!

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