Commit 9ec555e 1 parent 5248aa6 commit 9ec555e Copy full SHA for 9ec555e
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,13 @@ export function createPipelineFetcher<T> (getContentsList: () => Promise<T[]>) {
74
74
} ,
75
75
function fetchDirConfig ( state , params , db ) {
76
76
if ( params . dirConfig ) {
77
- const path = ( state . result [ 0 ] as any ) ?. _path || params . where ?. find ( w => w . _path ) ?. _path as string
78
- const dirConfig = db . find ( ( item : any ) => item . _path === joinURL ( path , '_dir' ) )
79
- if ( dirConfig ) {
80
- // @ts -ignore
81
- state . dirConfig = { _path : dirConfig . _path , ...withoutKeys ( [ '_' ] ) ( dirConfig ) }
77
+ const path = ( state . result [ 0 ] as any ) ?. _path || params . where ?. find ( w => w . _path ) ?. _path as ( string | RegExp )
78
+ if ( typeof path === 'string' ) {
79
+ const dirConfig = db . find ( ( item : any ) => item . _path === joinURL ( path , '_dir' ) )
80
+ if ( dirConfig ) {
81
+ // @ts -ignore
82
+ state . dirConfig = { _path : dirConfig . _path , ...withoutKeys ( [ '_' ] ) ( dirConfig ) }
83
+ }
82
84
}
83
85
}
84
86
return state
You can’t perform that action at this time.
0 commit comments