From ddc47d7eb36a3c68eaf1f3620ef087d322f2f578 Mon Sep 17 00:00:00 2001 From: Alex Bukach Date: Tue, 8 Nov 2022 09:02:16 -0800 Subject: [PATCH] Fixed detemining primary attribute key for meta tags --- src/HelmetUtils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HelmetUtils.js b/src/HelmetUtils.js index 5d072220..a2e6f2c5 100644 --- a/src/HelmetUtils.js +++ b/src/HelmetUtils.js @@ -128,6 +128,7 @@ const getTagsFromPropsList = (tagName, primaryAttributes, propsList) => { if ( primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && + tag[lowerCaseAttributeKey] && !( primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === @@ -144,6 +145,7 @@ const getTagsFromPropsList = (tagName, primaryAttributes, propsList) => { // Special case for innerHTML which doesn't work lowercased if ( primaryAttributes.indexOf(attributeKey) !== -1 && + tag[attributeKey] && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)