Skip to content

Commit

Permalink
return es2018 if process.version undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonFyfe authored Oct 21, 2024
1 parent 3dd72c0 commit c245eb8
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 c245eb8

Please sign in to comment.