From 9306caecbee72cf7a125eb9ed6499e580d70cb77 Mon Sep 17 00:00:00 2001 From: Yusuf Musleh Date: Thu, 7 Dec 2023 18:34:36 +0300 Subject: [PATCH] refactor: Remove not needed encoding --- src/content-tags-drawer/ContentTagsDropDownSelector.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content-tags-drawer/ContentTagsDropDownSelector.jsx b/src/content-tags-drawer/ContentTagsDropDownSelector.jsx index 8cb6429ab1..8cee9bfb1b 100644 --- a/src/content-tags-drawer/ContentTagsDropDownSelector.jsx +++ b/src/content-tags-drawer/ContentTagsDropDownSelector.jsx @@ -49,7 +49,7 @@ const ContentTagsDropDownSelector = ({ let traversal = tagsTree; lineage.forEach(t => { // We need to decode the tag to traverse the tree since the lineage value is encoded - traversal = traversal[decodeURIComponent(t)]?.children || {}; + traversal = traversal[t]?.children || {}; }); return (traversal[tag.value] && !traversal[tag.value].explicit) || false; @@ -90,7 +90,7 @@ const ContentTagsDropDownSelector = ({ className="d-flex align-items-center taxonomy-tags-selectable-box" aria-label={`${tagData.value} checkbox`} data-selectable-box="taxonomy-tags" - value={[...lineage, encodeURIComponent(tagData.value)].join(',')} + value={[...lineage, tagData.value].map(t => encodeURIComponent(t)).join(',')} isIndeterminate={isImplicit(tagData)} disabled={isImplicit(tagData)} > @@ -115,7 +115,7 @@ const ContentTagsDropDownSelector = ({