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:
Guy Bedford authored and Node.js GitHub Bot committed 2021-07-31 02:32:19 +00:00
1 parent 46e6c649ec
commit b0a6ade3bd
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -808,7 +808,7 @@ function hideInternalStackFrames(error) {
if (typeof stackFrames === 'object') {
frames = ArrayPrototypeFilter(
stackFrames,
(frm) => !StringPrototypeStartsWith(frm.getFileName(),
(frm) => !StringPrototypeStartsWith(frm.getFileName() || '',
'node:internal')
);
}
+1 -1
View File
@@ -1 +1 @@
require('./package-type-module/cjs.js');
eval("require('./package-type-module/cjs.js')");