Skip to content

Commit 0cec3c4

Browse files
committed
Removed unnecessary variable declaration
1 parent 5250fcf commit 0cec3c4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/datadog-esbuild/src/utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const { NODE_MAJOR, NODE_MINOR } = require('../../../version.js')
88

99
const getExportsImporting = (url) => import(url).then(Object.keys)
1010

11-
const isModernNode = NODE_MAJOR >= 20 || (NODE_MAJOR === 18 && NODE_MINOR >= 19)
1211
const getExports = async () => {
1312
const mod = await import('import-in-the-middle/lib/get-exports.mjs')
1413
return mod.getExports
@@ -82,7 +81,7 @@ async function processModule ({ path, internal, context, excludeDefault }) {
8281
exportNames = await getExportsImporting(path)
8382
} else {
8483
srcUrl = pathToFileURL(path)
85-
if (isModernNode) {
84+
if (NODE_MAJOR >= 20 || (NODE_MAJOR === 18 && NODE_MINOR >= 19)) {
8685
const resolvedGetExports = await getExports()
8786
exportNames = await resolvedGetExports(srcUrl, context, getSource)
8887
} else {

0 commit comments

Comments
 (0)