do not error on empty md link

This commit is contained in:
keyan 2022-05-18 13:30:36 -05:00
parent 6cc7288e99
commit fcd5c6cdf3
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ export default function Text ({ nofollow, children }) {
)
},
a: ({ node, href, children, ...props }) => {
children = children.map(e => typeof e === 'string'
children = children?.map(e => typeof e === 'string'
? reactStringReplace(e, /:high\[([^\]]+)\]/g, (match, i) => {
return <mark key={`mark-${match}-${i}`}>{match}</mark>
})