Skip to content

Commit b680b47

Browse files
committed
fix(query): prevent undefined error
1 parent 5ef2eca commit b680b47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/query/query.ts

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ export function createQuery <T = ParsedContent> (fetcher: ContentQueryFetcher<T>
3535
return result.surround
3636
}
3737

38+
if (!result) {
39+
return result
40+
}
41+
3842
if ((result as any)?.dirConfig) {
3943
result.result = {
4044
_path: (result as any).dirConfig?._path,

0 commit comments

Comments
 (0)