From d83522a14f11480dd8eb27754725bed2b65e5ccd Mon Sep 17 00:00:00 2001 From: 1aron Date: Thu, 8 Jun 2023 15:20:39 +0800 Subject: [PATCH] Fix(Explore Config): `TypeError: Cannot read properties of undefined (reading 'cwd')` --- packages/explore-config/src/explore-resolved-config-path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/explore-config/src/explore-resolved-config-path.ts b/packages/explore-config/src/explore-resolved-config-path.ts index ce5164a..4d1a869 100644 --- a/packages/explore-config/src/explore-resolved-config-path.ts +++ b/packages/explore-config/src/explore-resolved-config-path.ts @@ -4,5 +4,5 @@ import upath from 'upath' export function exploreResolvedConfigPath(sources: Pattern | Pattern[], options?: Options) { const foundPath = exploreConfigPath(sources, options) - return foundPath ? upath.resolve(options.cwd, foundPath) : '' + return foundPath ? upath.resolve(options?.cwd || '', foundPath) : '' } \ No newline at end of file