Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test-esm-loader-invalid-format
  • Loading branch information
Julian Londono
Julian Londono committed Jul 17, 2020
commit 0fc1e6b7a3a6f89f59c45b5caf9c22ed3cd546c8
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class Loader {
const url = await this.resolve(specifier, parentURL);
let format = await this.getFormat(url);
let source;
if(format !== "builtin" && format !== "commonjs"){
if(format !== "builtin" && format !== "commonjs" && translators.get(format)){
const sourceObj = await this.getSource(url, format);
({ source } = sourceObj);
format = sourceObj.format? sourceObj.format : format;
Expand Down