From 0da01c0ca6b537f74be32126e567bdfc2c73ed16 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 26 Jun 2024 17:24:10 -0400 Subject: refactor: move PackageJson to deno_config (#24348) --- ext/node/polyfills/01_require.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/polyfills') diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index bdd91e0b4..da598fe29 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -1055,7 +1055,7 @@ Module._extensions[".js"] = function (module, filename) { if (StringPrototypeEndsWith(filename, ".js")) { const pkg = op_require_read_closest_package_json(filename); - if (pkg && pkg.exists && pkg.typ === "module") { + if (pkg && pkg.typ === "module") { throw createRequireEsmError( filename, moduleParentCache.get(module)?.filename, -- cgit v1.2.3