Skip to content

Commit

Permalink
Fix standalone tag when data-type is not set.
Browse files Browse the repository at this point in the history
Fixes #11621.
  • Loading branch information
dfabulich committed May 27, 2020
1 parent 58df778 commit 4adbbfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-standalone/src/transformScriptTags.js
Expand Up @@ -53,7 +53,7 @@ function buildBabelOptions(script, filename) {
*/
function run(transformFn, script) {
const scriptEl = document.createElement("script");
if (typeof script.type !== "undefined") {
if (script.type) {
scriptEl.setAttribute("type", script.type);
}
scriptEl.text = transformCode(transformFn, script);
Expand Down

0 comments on commit 4adbbfb

Please sign in to comment.