Skip to content

Commit

Permalink
fix(query): prevent undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Aug 30, 2023
1 parent 5ef2eca commit b680b47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/query/query.ts
Expand Up @@ -35,6 +35,10 @@ export function createQuery <T = ParsedContent> (fetcher: ContentQueryFetcher<T>
return result.surround
}

if (!result) {
return result
}

if ((result as any)?.dirConfig) {
result.result = {
_path: (result as any).dirConfig?._path,
Expand Down

0 comments on commit b680b47

Please sign in to comment.