-
Notifications
You must be signed in to change notification settings - Fork 47k
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
renderToStaticMarkup incorrectly renders async attribute #11624
Comments
Does this break the code? Boolean attributes can be emitted with |
@gaearon no it doesn't appear to break the code, but surely both methods should behave the same when outputting boolean attributes? Feel free to close if unnecessary. |
AFAIK |
Do you want to request a feature or report a bug?
Bug
What is the current behaviour?
The async tag is rendered with a value of empty quotes like so:
<script async="" src={url}></script>
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem:
http://jsfiddle.net/twceacmz/
Note: The fiddle adds the async tag to a div because script tags aren't allowed. The behaviour is exactly the same.
What is the expected behavior?
The async tag should be rendered with no quotes like so:
<script async src={url}></script>
Using
react-dom
'srender
method the async tag works as expected - its only withreact-dom/server
'srenderToStaticMarkup
method that the behaviour is different.Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Latest
The text was updated successfully, but these errors were encountered: