diff --git a/lib/v2/infoq/utils.js b/lib/v2/infoq/utils.js index 468030bbb6..bb5f7ec421 100644 --- a/lib/v2/infoq/utils.js +++ b/lib/v2/infoq/utils.js @@ -58,8 +58,12 @@ const parseToSimpleTexts = (content) => } }, blockquote: () => { - const text = parseToSimpleText(i.content); - return `
${text}`; + if (i.content) { + const text = parseToSimpleText(i.content); + return `
${text}`; + } else { + return ''; + } }, image: () => { const img = i.attrs.src; @@ -76,7 +80,7 @@ const parseToSimpleTexts = (content) => }, link: () => { const href = i.attrs.href; - const text = parseToSimpleText(i.content); + const text = i.content ? parseToSimpleText(i.content) : ''; return `${text}"`; }, };