Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit fac6bbb

Browse files
committed
fix(gatsby-theme-docz): fix can't read route of undefined
1 parent 7711a20 commit fac6bbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/gatsby-theme-docz/src/base/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const Route = ({ children, entry, ...defaultProps }) => {
2525
}
2626

2727
const findEntry = (db, ctx) => {
28-
const isIndex = ctx.frontmatter.route === '/'
28+
const isIndex = ctx.frontmatter && ctx.frontmatter.route === '/'
2929
const eqIndex = propEq('value.route', '/')
3030
if (!ctx.entry && isIndex) return db.entries.find(eqIndex)
3131
const filepath = get('entry.filepath', ctx)

0 commit comments

Comments
 (0)