Skip to content

Commit

Permalink
fix: whether it is react18 should not rely on internalDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
yimingjfe authored and KyrieLii committed Dec 19, 2023
1 parent bb75155 commit 08df017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/toolkit/utils/src/cli/is/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const isBeyondReact17 = (cwd: string) => {
return semver.satisfies(semver.minVersion(deps.react)!, '>=17.0.0');
};

export const isReact18 = (cwd: string) => {
export const isReact18 = (cwd: string = process.cwd()) => {
const pkgPath = path.join(cwd, 'package.json');

if (!fs.existsSync(pkgPath)) {
Expand Down

0 comments on commit 08df017

Please sign in to comment.