diff --git a/packages/core/src/utils/content-block.ts b/packages/core/src/utils/content-block.ts index f57827e19..58443c460 100644 --- a/packages/core/src/utils/content-block.ts +++ b/packages/core/src/utils/content-block.ts @@ -26,7 +26,7 @@ export function extractInternalLinks(block: ContentBlock) { const links: InternalLinkWithOffset[] = []; for (const match of matches || []) { - if (!match.index) continue; + if (match.index === undefined) continue; const url = match[1].slice(0, match[1].indexOf("|")); const text = match[1].slice(match[1].indexOf("|") + 1); const link = parseInternalLink(url);