Skip to content

Commit

Permalink
fix: ensureFunctionName may be undefined (#16683)
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
liuxingbaoyu authored Jul 28, 2024
1 parent 026c8b3 commit 0acf0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-function-name/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default declare(api => {
if (value.isFunction()) {
if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {
// polyfill when being run by an older Babel version
path.ensureFunctionName ??=
value.ensureFunctionName ??=
// eslint-disable-next-line no-restricted-globals
require("@babel/traverse").NodePath.prototype.ensureFunctionName;
}
Expand Down

0 comments on commit 0acf0ac

Please sign in to comment.