Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/node_modules/react-helmet/es/Helmet.js b/node_modules/react-helmet/es/Helmet.js
- index 11d745a..9a1422d 100644
- --- a/node_modules/react-helmet/es/Helmet.js
- +++ b/node_modules/react-helmet/es/Helmet.js
- @@ -38,7 +38,8 @@ var TAG_PROPERTIES = {
- PROPERTY: "property",
- REL: "rel",
- SRC: "src",
- - TARGET: "target"
- + TARGET: "target",
- + ASYNC: "async"
- };
- var REACT_TAG_MAP = {
- @@ -488,6 +489,14 @@ var updateTags = function updateTags(type, tags) {
- var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute];
- newElement.setAttribute(attribute, value);
- }
- +
- + // The async attribute is ignored on dynamic scripts, the property must be set directly
- + if (
- + attribute === TAG_PROPERTIES.ASYNC &&
- + typeof tag.async === "boolean"
- + ) {
- + newElement.async = tag.async;
- + }
- }
- }
- diff --git a/node_modules/react-helmet/lib/Helmet.js b/node_modules/react-helmet/lib/Helmet.js
- index d7f564c..3953169 100644
- --- a/node_modules/react-helmet/lib/Helmet.js
- +++ b/node_modules/react-helmet/lib/Helmet.js
- @@ -44,7 +44,8 @@ var TAG_PROPERTIES = {
- PROPERTY: "property",
- REL: "rel",
- SRC: "src",
- - TARGET: "target"
- + TARGET: "target",
- + ASYNC: "async"
- };
- var REACT_TAG_MAP = {
- @@ -494,6 +495,14 @@ var updateTags = function updateTags(type, tags) {
- var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute];
- newElement.setAttribute(attribute, value);
- }
- +
- + // The async attribute is ignored on dynamic scripts, the property must be set directly
- + if (
- + attribute === TAG_PROPERTIES.ASYNC &&
- + typeof tag.async === "boolean"
- + ) {
- + newElement.async = tag.async;
- + }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement