Skip to content

Commit

Permalink
Fix/filter out doctype tags from legacy head tags (#2715)
Browse files Browse the repository at this point in the history
doctype tag is typically ID: 1 so this filter was removing it properly.
However there is an edge case that can include more doctype tags so a
better solution is to filter them out by type
  • Loading branch information
agalin920 authored and shrunyan committed May 31, 2024
1 parent ac4e765 commit b29ab32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shell/components/Head/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default connect((state, props) => {

const legacyHeadTags = useMemo(() => {
const customRawLegacyHeadTags = rawLegacyHeadTags?.filter(
(tag) => tag.resourceZUID === null && tag.ID > 1
(tag) => tag.resourceZUID === null && tag.ID > 1 && tag.type !== "doctype"
);

return customRawLegacyHeadTags?.map((tag) => {
Expand Down

0 comments on commit b29ab32

Please sign in to comment.