From 11c3b09f692c5436e013d6df249377843db2a381 Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Wed, 30 Aug 2023 01:35:48 +0200 Subject: [PATCH] fix: Cannot read properties of undefined --- src/runtime/query/match/pipeline-legacy.ts | 6 +++--- src/runtime/query/query.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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),