@@ -21,7 +21,7 @@ export interface PageIdParams {
21
21
pageId : string ;
22
22
}
23
23
24
- type SectionsList = { list : SiteSection [ ] ; section : SiteSection ; } ;
24
+ type SectionsList = { list : SiteSection [ ] ; section : SiteSection } ;
25
25
26
26
/**
27
27
* Fetch all the data needed to render the content layout.
@@ -42,9 +42,10 @@ export async function fetchContentData() {
42
42
const site = siteStructure . site ;
43
43
44
44
const siteSections = getSiteSectionsList ( content . siteSectionId , siteStructure . sections ) ;
45
-
45
+
46
46
const spaces =
47
- siteStructure . spaces ?? ( siteSections ? parseSpacesFromSiteSpaces ( siteSections . section . siteSpaces ) : [ ] ) ;
47
+ siteStructure . spaces ??
48
+ ( siteSections ? parseSpacesFromSiteSpaces ( siteSections . section . siteSpaces ) : [ ] ) ;
48
49
49
50
// we grab the space attached to the parent as it contains overriden customizations
50
51
const spaceRelativeToParent = spaces ?. find ( ( space ) => space . id === content . spaceId ) ;
@@ -68,11 +69,11 @@ function getSiteSectionsList(siteSectionId?: string, sections?: SiteSection[] |
68
69
return null ;
69
70
}
70
71
const section = sections ?. find ( ( section ) => section . id === siteSectionId ) ;
71
- assert ( sectionIsDefined ( section ) , " A section must be defined when there are multiple sections" ) ;
72
+ assert ( sectionIsDefined ( section ) , ' A section must be defined when there are multiple sections' ) ;
72
73
return { list : sections , section } satisfies SectionsList ;
73
74
}
74
75
75
- function sectionIsDefined ( section ?: SiteSection ) : section is NonNullable < SiteSection > {
76
+ function sectionIsDefined ( section ?: SiteSection ) : section is NonNullable < SiteSection > {
76
77
return typeof section !== 'undefined' && section !== null ;
77
78
}
78
79
0 commit comments