From 785ebfb0012cc28596a27c82bd540bdbf8f8cfbd Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 14 Jun 2022 18:00:02 +0300 Subject: [PATCH] fix indexOf on null image --- src/shared/components/MetaTags.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/MetaTags.jsx b/src/shared/components/MetaTags.jsx index 4b192752df..cc0067393c 100644 --- a/src/shared/components/MetaTags.jsx +++ b/src/shared/components/MetaTags.jsx @@ -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;