Skip to content

Commit

Permalink
fix(core): ensure page.title isString, close #1306
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Apr 20, 2023
1 parent 5d60575 commit c224ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/page/renderPageContent.ts
Expand Up @@ -4,7 +4,7 @@ import type {
MarkdownLink,
MarkdownSfcBlocks,
} from '@vuepress/markdown'
import { omit } from '@vuepress/shared'
import { isString, omit } from '@vuepress/shared'
import type { App, PageFrontmatter, PageOptions } from '../types/index.js'

/**
Expand Down Expand Up @@ -74,6 +74,6 @@ export const renderPageContent = ({
'frontmatter'
),
sfcBlocks,
title: frontmatter.title ?? title,
title: isString(frontmatter.title) ? frontmatter.title : title,
}
}

0 comments on commit c224ff5

Please sign in to comment.