Skip to content

Commit

Permalink
Merge pull request #6385 from topcoder-platform/social-share-thumb
Browse files Browse the repository at this point in the history
fix indexOf on null image
  • Loading branch information
luizrrodrigues authored Jun 14, 2022
2 parents f36f059 + 785ebfb commit a4123f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/components/MetaTags.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function MetaTags({
feedTitle,
}) {
let img = `${domain}${image}`;
if (image.indexOf('http://') === 0 || image.indexOf('https://') === 0) {
if (image && (image.indexOf('http://') === 0 || image.indexOf('https://') === 0)) {
img = `${image}`;
}
const socTitle = socialTitle || title;
Expand Down

0 comments on commit a4123f9

Please sign in to comment.