Skip to content

Commit

Permalink
module: fix ERR_REQUIRE_ESM error for null frames
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jul 30, 2021
1 parent 46e6c64 commit 830c547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ function hideInternalStackFrames(error) {
if (typeof stackFrames === 'object') {
frames = ArrayPrototypeFilter(
stackFrames,
(frm) => !StringPrototypeStartsWith(frm.getFileName(),
(frm) => !StringPrototypeStartsWith(frm.getFileName() || '',
'node:internal')
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/es-modules/cjs-esm.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./package-type-module/cjs.js');
eval("require('./package-type-module/cjs.js')");

0 comments on commit 830c547

Please sign in to comment.