Skip to content

Commit 50c2434

Browse files
slengyel-lnxQingWei-Li
authored andcommitted
fix: improve external script plugin (#632)
1 parent 1897bb6 commit 50c2434

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/plugins/external-script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function handleExternalScript() {
1010
var newScript = document.createElement('script');
1111

1212
Array.prototype.slice.call(script.attributes).forEach(function (attribute) {
13-
newScript[attribute.name] = attribute.value;
13+
newScript.setAttribute(attribute.name, attribute.value);
1414
});
1515

1616
script.parentNode.insertBefore(newScript, script);

lib/plugins/external-script.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)