Skip to content

Commit

Permalink
esm: change transformSource to load for error
Browse files Browse the repository at this point in the history
  • Loading branch information
bmacnaughton committed Oct 30, 2023
1 parent 3cc41d2 commit 9a9b6f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/translators.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function assertBufferSource(body, allowString, hookName) {

function stringify(body) {
if (typeof body === 'string') return body;
assertBufferSource(body, false, 'transformSource');
assertBufferSource(body, false, 'load');
const { TextDecoder } = require('internal/encoding');
DECODER = DECODER === null ? new TextDecoder() : DECODER;
return DECODER.decode(body);
Expand Down

0 comments on commit 9a9b6f1

Please sign in to comment.