From b91fd8a27978fec9f7f9ac6d6033844af4cfbf90 Mon Sep 17 00:00:00 2001 From: Asif Rahman Date: Thu, 23 Dec 2021 23:58:13 +0530 Subject: [PATCH] added check for attr to be string --- src/HelmetUtils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/HelmetUtils.js b/src/HelmetUtils.js index 5d072220..3dc2d50f 100644 --- a/src/HelmetUtils.js +++ b/src/HelmetUtils.js @@ -152,7 +152,11 @@ const getTagsFromPropsList = (tagName, primaryAttributes, propsList) => { } } - if (!primaryAttributeKey || !tag[primaryAttributeKey]) { + if ( + !primaryAttributeKey || + !tag[primaryAttributeKey] || + typeof tag[primaryAttributeKey] !== "string" + ) { return false; }