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 standalone tag when data-type is not set. #11624
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4adbbfb:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/22977/ |
Thanks! |
I see an empty string i my browser 🙃 Maybe it's better to just do if (!script.type)
?
Yeah let's go with a |
d2e5902
to
4adbbfb
Compare
Switched to a truthy check. I'm a bit surprised to see that y'all had an empty string; I tested the previous version on Chrome 83, Safari 13.1, and Firefox 76, both with and without a |
@dfabulich thanks for the quick fix! |
Fixes #11621.
I thought
getAttribute
returnedundefined
when the attribute was unset, but it actually returns null. 🤦♂️I manually tested this patch with and without a
data-type
attribute. (It appears that the babel-standalone script tag has no tests?? I might add some later, but for now, I want to fix this bug right away.)