Skip to content

Commit 785ebfb

Browse files
committed
fix indexOf on null image
1 parent 7b43f2e commit 785ebfb

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)