Skip to content

Commit

Permalink
fix(core): check for 3rd party packages properly when 'dependencies' …
Browse files Browse the repository at this point in the history
…is not defined
  • Loading branch information
dphang committed Nov 21, 2021
1 parent 187c51d commit 5006439
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/libs/core/src/build/third-party/integration-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ export abstract class ThirdPartyIntegrationBase {

if (await fse.pathExists(packageJsonPath)) {
const packageJson = await fse.readJSON(packageJsonPath);
return !!packageJson.dependencies[name];
if (packageJson.dependencies && packageJson.dependencies[name]) {
return true;
}
if (packageJson.devDependencies && packageJson.devDependencies[name]) {
return true;
}
}

return false;
Expand Down

0 comments on commit 5006439

Please sign in to comment.