Skip to content

Commit

Permalink
fix(cli): Don't error if there are no scripts (#4763)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jun 25, 2021
1 parent 20dde32 commit dec3fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export async function runPlatformHook(
): Promise<void> {
const { spawn } = await import('child_process');
const pkg = await readJSON(join(platformDir, 'package.json'));
const cmd = pkg.scripts[hook];
const cmd = pkg.scripts?.[hook];

if (!cmd) {
return;
Expand Down

0 comments on commit dec3fb2

Please sign in to comment.