Skip to content

Commit

Permalink
Shorten code [refactor]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 13, 2023
1 parent efef900 commit 07b7802
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/instrument/instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ function babelTransform(ast, isEsm, isJsx) {
plugins.push(babelPluginModulesToCommonJs, babelPluginDynamicImportToRequire);
}
if (isJsx) {
if (!babelPluginTransformJsx) {
babelPluginTransformJsx = require('@babel/plugin-transform-react-jsx').default;
}
babelPluginTransformJsx ||= require('@babel/plugin-transform-react-jsx').default;
plugins.push(babelPluginTransformJsx);
}

Expand Down

0 comments on commit 07b7802

Please sign in to comment.