зеркало из https://github.com/github/docs.git
fix: sometimes the page doesn't have children (#19919)
This commit is contained in:
Родитель
572a05c123
Коммит
6172262be7
|
@ -77,7 +77,7 @@ export const useProductLandingContext = (): ProductLandingContextT => {
|
|||
export const getProductLandingContextFromRequest = (req: any): ProductLandingContextT => {
|
||||
const productTree = req.context.currentProductTree
|
||||
const page = req.context.page
|
||||
const hasGuidesPage = page.children.includes('/guides')
|
||||
const hasGuidesPage = (page.children || []).includes('/guides')
|
||||
return {
|
||||
...pick(page, [
|
||||
'title',
|
||||
|
|
Загрузка…
Ссылка в новой задаче