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(
257257 const footerFiles : string [ ] = [ ] ;
258258 const pageFooter = resolvePageFooter ( config ) ;
259259 const addFooterItems = ( region ?: PageFooterRegion ) => {
260- if ( ! region ) return ;
260+ if ( ! region || typeof region === "string" ) return ;
261261 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 ) ;
267265 }
268266 }
269267 } ;
Original file line number Diff line number Diff line change @@ -109,10 +109,10 @@ export const Base_ZodNavigationItemObject = z.object({
109109} ) . strict ( ) . partial ( ) ;
110110
111111type NavigationItemObject = z . infer < typeof Base_ZodNavigationItemObject > & {
112- menu : NavigationItem [ ] ;
112+ menu ? : NavigationItem [ ] ;
113113} ;
114114
115115export const ZodNavigationItemObject : z . ZodType < NavigationItemObject > =
116116 Base_ZodNavigationItemObject . extend ( {
117117 menu : z . array ( z . lazy ( ( ) => ZodNavigationItem ) ) ,
118- } ) ;
118+ } ) . strict ( ) . partial ( ) ;
You can’t perform that action at this time.
0 commit comments