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 Literally undefined class #3283 #3319

Closed
wants to merge 1 commit into from
Closed

fix Literally undefined class #3283 #3319

wants to merge 1 commit into from

Conversation

bre30kra69cs
Copy link
Contributor

Literally undefined class #3283

Added check for className. In compiled file its look like:

image

Its no option to modify ‘attr’ function because it gets concatenated className string from image above (null + " svelte-abc"):

image:

I prefer logical 'or' to ternary operator because className token may be a function with side effects and we will call function twice:

image
image

I think in future we must add special class name resolver function. Also added tests.
Thanks

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.

1 participant