Skip to content

Commit

Permalink
Fix the type attribute setter in the script tag
Browse files Browse the repository at this point in the history
  • Loading branch information
arku committed May 27, 2020
1 parent 58df778 commit adea7fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-standalone/src/transformScriptTags.js
Original file line number Diff line number Diff line change
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 (typeof script.type !== "undefined" && script.type !== null) {
scriptEl.setAttribute("type", script.type);
}
scriptEl.text = transformCode(transformFn, script);
Expand Down

0 comments on commit adea7fc

Please sign in to comment.