diff --git a/src/runtime/query/match/pipeline-legacy.ts b/src/runtime/query/match/pipeline-legacy.ts index ac0214c4f..455c8e052 100644 --- a/src/runtime/query/match/pipeline-legacy.ts +++ b/src/runtime/query/match/pipeline-legacy.ts @@ -11,10 +11,10 @@ export function createPipelineFetcherLegacy (getContentsList: () => Promise (getContentsList: () => Promise (fetcher: ContentQueryFetcher return result.surround } - if ((result as any).dirConfig) { + if ((result as any)?.dirConfig) { result.result = { _path: (result as any).dirConfig?._path, ...(result.result as T),