Skip to content

Commit

Permalink
fix: fix mustExist option issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 10, 2023
1 parent 5819e86 commit 586e366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function autoConf<T>(namespace: string = 'autoconf', option: AutoConfOpti
return merge(defaultValue, resultData, { default: resultData });
}
}
if (!!mustExist && (!configPath || !fs.existsSync(pkgPath))) {
if (!!mustExist && !configPath && !fs.existsSync(pkgPath)) {
return null;
}
if (resultData) {
Expand Down

0 comments on commit 586e366

Please sign in to comment.