mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
module: fix ERR_REQUIRE_ESM error for null frames
PR-URL: https://github.com/nodejs/node/pull/39593 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
6c769ccedf
commit
93bbaa0ce9
|
|
@ -808,7 +808,7 @@ function hideInternalStackFrames(error) {
|
||||||
if (typeof stackFrames === 'object') {
|
if (typeof stackFrames === 'object') {
|
||||||
frames = ArrayPrototypeFilter(
|
frames = ArrayPrototypeFilter(
|
||||||
stackFrames,
|
stackFrames,
|
||||||
(frm) => !StringPrototypeStartsWith(frm.getFileName(),
|
(frm) => !StringPrototypeStartsWith(frm.getFileName() || '',
|
||||||
'node:internal')
|
'node:internal')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
test/fixtures/es-modules/cjs-esm.js
vendored
2
test/fixtures/es-modules/cjs-esm.js
vendored
|
|
@ -1 +1 @@
|
||||||
require('./package-type-module/cjs.js');
|
eval("require('./package-type-module/cjs.js')");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user