Skip to content

Commit

Permalink
fix(client-db): fetch dir config on legacy query
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jan 30, 2024
1 parent 3555edc commit 4b9b6b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/query/match/pipeline-legacy.ts
Expand Up @@ -6,6 +6,10 @@ export function createPipelineFetcherLegacy<T> (getContentsList: () => Promise<T
const _pipelineFetcher = createPipelineFetcher(getContentsList)

return async (query: QueryBuilder<T>): Promise<T | T[]> => {
// fetch dir config to match api behavior
if (query.params().first) {
(query as unknown as ContentQueryBuilder<T>).withDirConfig()
}
const params = query.params()
const result = await _pipelineFetcher(query as unknown as ContentQueryBuilder<T>)

Expand Down

0 comments on commit 4b9b6b7

Please sign in to comment.