File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -257,13 +257,11 @@ export async function bookProjectConfig(
257
257
const footerFiles : string [ ] = [ ] ;
258
258
const pageFooter = resolvePageFooter ( config ) ;
259
259
const addFooterItems = ( region ?: PageFooterRegion ) => {
260
- if ( ! region ) return ;
260
+ if ( ! region || typeof region === "string" ) return ;
261
261
for ( const item of region ) {
262
- if ( typeof item !== "string" ) {
263
- const navItem = Zod . NavigationItemObject . parse ( item ) ;
264
- if ( navItem . href && ! isAbsoluteRef ( navItem . href ) ) {
265
- footerFiles . push ( navItem . href ) ;
266
- }
262
+ const navItem = Zod . NavigationItemObject . parse ( item ) ;
263
+ if ( navItem . href && ! isAbsoluteRef ( navItem . href ) ) {
264
+ footerFiles . push ( navItem . href ) ;
267
265
}
268
266
}
269
267
} ;
Original file line number Diff line number Diff line change @@ -109,10 +109,10 @@ export const Base_ZodNavigationItemObject = z.object({
109
109
} ) . strict ( ) . partial ( ) ;
110
110
111
111
type NavigationItemObject = z . infer < typeof Base_ZodNavigationItemObject > & {
112
- menu : NavigationItem [ ] ;
112
+ menu ? : NavigationItem [ ] ;
113
113
} ;
114
114
115
115
export const ZodNavigationItemObject : z . ZodType < NavigationItemObject > =
116
116
Base_ZodNavigationItemObject . extend ( {
117
117
menu : z . array ( z . lazy ( ( ) => ZodNavigationItem ) ) ,
118
- } ) ;
118
+ } ) . strict ( ) . partial ( ) ;
You can’t perform that action at this time.
0 commit comments