Skip to content

Commit

Permalink
chore: add hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Nov 20, 2023
1 parent d4ff3be commit e5e7af9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/page/createPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const createPage = async (
// @ts-expect-error use meta instead
routeMeta: new Proxy(meta, {
set: (obj, prop, value) => {
console.error('RouteMeta is deprecated, use meta instead.')
console.warn('routeMeta is deprecated, please use meta instead')

obj[prop as string] = value
return true
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/page/resolvePageMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ export const resolvePageMeta = ({
frontmatter: PageFrontmatter
}): Record<string, unknown> => {
// TODO: Added for backwards compatibility, should be removed in stable
if (frontmatter.routeMeta)
if (frontmatter.routeMeta) {
console.warn('routeMeta is deprecated, please use meta instead')
frontmatter.meta = { ...frontmatter.routeMeta, ...frontmatter.meta }
}

return frontmatter.meta ?? {}
}

0 comments on commit e5e7af9

Please sign in to comment.