You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #113 Fixing null and false attributes (weaverryan)
This PR was merged into the main branch.
Discussion
----------
Fixing null and false attributes
Hi!
Suppose this config:
```yaml
webpack_encore:
script_attributes:
defer: false
async: null
```
This PR changes what this outputs:
```html
<!-- 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!
Commits
-------
5dc7e3c Fixing null and false attributes
0 commit comments