Skip to content

Commit a4123f9

Browse files
Merge pull request #6385 from topcoder-platform/social-share-thumb
fix indexOf on null image
2 parents f36f059 + 785ebfb commit a4123f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/components/MetaTags.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function MetaTags({
2525
feedTitle,
2626
}) {
2727
let img = `${domain}${image}`;
28-
if (image.indexOf('http://') === 0 || image.indexOf('https://') === 0) {
28+
if (image && (image.indexOf('http://') === 0 || image.indexOf('https://') === 0)) {
2929
img = `${image}`;
3030
}
3131
const socTitle = socialTitle || title;

0 commit comments

Comments
 (0)