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

Fixing null and false attributes #113

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

weaverryan
Copy link
Member

Hi!

Suppose this config:

webpack_encore:
    script_attributes:
        defer: false
        async: null

This PR changes what this outputs:

<!-- before -->
<script src="..." defer="" async=""></script>

<!-- after -->
<script src="..." async></script>

This was an oversight when I built the feature.

With this PR, false correctly means "do not show this attribute". null is a bit trickier: I chose to make this mean "show the attribute, but with value (e.g. <script defer>). Any other values are rendered normally.

Cheers!

@maxhelias
Copy link

It fix this issue : #103

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.

3 participants