Skip to content

Commit

Permalink
fix(jest): handle process.version undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonFyfe committed Oct 21, 2024
1 parent 3dd72c0 commit 9573321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function buildSwcTransformOpts(
computedSwcOptions,
"jsc.target",
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
nodeTargetDefaults.get(process.version.match(/v(\d+)/)![1]) ||
nodeTargetDefaults.get(process.version?.match(/v(\d+)/)![1]) ||
"es2018"
);
}
Expand Down

0 comments on commit 9573321

Please sign in to comment.