Skip to content

Commit

Permalink
refactor: Remove not needed encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuf-musleh committed Dec 7, 2023
1 parent 8b66d7c commit 9306cae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content-tags-drawer/ContentTagsDropDownSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)}
>
Expand All @@ -115,7 +115,7 @@ const ContentTagsDropDownSelector = ({
<ContentTagsDropDownSelector
taxonomyId={taxonomyId}
level={level + 1}
lineage={[...lineage, encodeURIComponent(tagData.value)]}
lineage={[...lineage, tagData.value]}
tagsTree={tagsTree}
searchTerm={searchTerm}
/>
Expand Down

0 comments on commit 9306cae

Please sign in to comment.