fix(shared): Guard remark-intro-plugin against missing data
This commit is contained in:
parent
2f7d6e4505
commit
3a903b7e17
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ export const remarkIntroPlugin = (opts={}) => {
|
|||
const { intro=[] } = opts
|
||||
|
||||
// Check to see whether the node has frontmatter
|
||||
const hasFrontmatter = node => (node.children[0].type === 'yaml')
|
||||
const hasFrontmatter = node => (node?.children?.[0]?.type === 'yaml')
|
||||
|
||||
// Pulls text out of a paragraph
|
||||
const extractIntro = node => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue