File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -159,22 +159,15 @@ export default class ConfigValidator implements IConfigValidator {
159159 if ( ! customization . customPages ) {
160160 customization . customPages = [ ] ;
161161 }
162- const normalizeComponent = ( comp : any ) => {
163- if ( typeof comp === 'string' ) {
164- return { file : comp , meta : { } } ;
165- }
166- const meta = comp . meta || { } ;
162+ customization . customPages . forEach ( ( page , i ) => {
163+ page . component = this . validateComponent ( page . component , errors ) ;
164+ const meta = page . component . meta || { } ;
167165 if ( meta . sidebarAndHeader === undefined ) {
168166 meta . sidebarAndHeader = meta . customLayout === true ? 'none' : 'default' ;
169167 }
170168 delete meta . customLayout ;
171- return { ...comp , meta } ;
172- } ;
173-
174- customization . customPages . forEach ( ( page , i ) => {
175- const normalizedComponent = normalizeComponent ( page . component ) ;
176- this . validateComponent ( normalizedComponent , errors ) ;
177- customization . customPages [ i ] . component = normalizedComponent ;
169+ page . component . meta = meta ;
170+ customization . customPages [ i ] . component = page . component ;
178171 } ) ;
179172
180173 if ( ! customization . brandName ) { //} === undefined) {
You can’t perform that action at this time.
0 commit comments