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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 馃悰 BUG: class:list directive adding class attribute when undefined #4867

Merged
merged 4 commits into from Sep 26, 2022
Merged

fix: 馃悰 BUG: class:list directive adding class attribute when undefined #4867

merged 4 commits into from Sep 26, 2022

Conversation

rishi-raj-jain
Copy link
Contributor

@rishi-raj-jain rishi-raj-jain commented Sep 25, 2022

fixes #4001

With the specific reproduction, it seemed as if class:list in component with mapped attributes would always created even if value is undefined. Fixed it by checking if value exists beforehand, else it gets to the point push(value) and hence the empty class attribute.

@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2022

馃 Changeset detected

Latest commit: 3c4f72b

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

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 25, 2022
@rishi-raj-jain rishi-raj-jain changed the title Update hydration.ts fix: 馃悰 BUG: class:list directive adding class attribute when undefined Sep 25, 2022
@matthewp
Copy link
Contributor

Thanks!

@matthewp matthewp merged commit 03e8b75 into withastro:main Sep 26, 2022
@astrobot-houston astrobot-houston mentioned this pull request Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

馃悰 BUG: class:list directive adding class attribute when undefined
2 participants