Skip to content

Commit

Permalink
Handle missing dependencies/devDependencies (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
davecardwell authored Jan 12, 2023
1 parent df9b9ec commit 9e45d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/swcx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const getCoreVersion = () => {
devDependencies,
} = require(cwdPackageManifestPath);
const swcCoreVersion =
dependencies["@swc/core"] || devDependencies["@swc/core"];
dependencies?.["@swc/core"] || devDependencies?.["@swc/core"];
if (swcCoreVersion) {
return minVersion(swcCoreVersion);
}
Expand Down

0 comments on commit 9e45d8c

Please sign in to comment.