Skip to content

Commit

Permalink
Merge pull request #11 from americanexpress/bugfix/helmet-title
Browse files Browse the repository at this point in the history
fix(title): do not override browser tab title
  • Loading branch information
Jonathan Golden authored Apr 23, 2020
2 parents dff24c7 + c424669 commit e93f16f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
10 changes: 0 additions & 10 deletions __tests__/__snapshots__/index.spec.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ exports[`SEO should render articles correctly 1`] = `
},
]
}
title="Lorem Ipsum"
titleTemplate=""
/>
`;

Expand Down Expand Up @@ -108,8 +106,6 @@ exports[`SEO should render children correctly 1`] = `
},
]
}
title="Lorem Ipsum"
titleTemplate=""
>
<script
src="https://example.com/foo.js"
Expand Down Expand Up @@ -177,8 +173,6 @@ exports[`SEO should render images correctly 1`] = `
},
]
}
title="Lorem Ipsum"
titleTemplate=""
/>
`;

Expand Down Expand Up @@ -237,8 +231,6 @@ exports[`SEO should render images pathnames correctly 1`] = `
},
]
}
title="Lorem Ipsum"
titleTemplate=""
/>
`;

Expand Down Expand Up @@ -290,7 +282,5 @@ exports[`SEO should render the snapshot correctly 1`] = `
},
]
}
title="Lorem Ipsum"
titleTemplate=""
/>
`;
5 changes: 0 additions & 5 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const SEO = ({
pathname,
siteUrl,
title,
titleTemplate,
}) => {
const image = metaImage && metaImage.src ? `${siteUrl}${metaImage.src}` : null;

Expand Down Expand Up @@ -105,10 +104,8 @@ const SEO = ({
return (
<Helmet
htmlAttributes={{ lang }}
title={title}
link={link}
meta={metaTags}
titleTemplate={titleTemplate}
>
{children}
</Helmet>
Expand All @@ -129,7 +126,6 @@ SEO.propTypes = {
pathname: PropTypes.string,
siteUrl: PropTypes.string,
title: PropTypes.string,
titleTemplate: PropTypes.string,
};

SEO.defaultProps = {
Expand All @@ -144,7 +140,6 @@ SEO.defaultProps = {
pathname: '',
siteUrl: '',
title: '',
titleTemplate: '',
};

export default SEO;

0 comments on commit e93f16f

Please sign in to comment.