Skip to content

Commit

Permalink
fix: don't crash if codegenConfig is not defined in package.json (#716)
Browse files Browse the repository at this point in the history
This will prevent undefined from being thrown as error and actual error
will be thrown.

#713

Co-authored-by: Ritesh Shukla2 <[email protected]>
  • Loading branch information
riteshshukla04 and Ritesh Shukla2 authored Dec 10, 2024
1 parent a0ca7d2 commit 3f537f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function patchCodegenAndroidPackage(
report: Report
) {
let codegenAndroidPath: string | undefined =
packageJson.codegenConfig.outputDir.android;
packageJson.codegenConfig?.outputDir?.android;
if (!codegenAndroidPath) {
throw new Error(
`Your package.json doesn't contain codegenConfig.outputDir.android. Please see ${CODEGEN_DOCS}`
Expand Down

0 comments on commit 3f537f1

Please sign in to comment.