Skip to content

Commit

Permalink
Fix module source code example typo
Browse files Browse the repository at this point in the history
Co-authored-by: Mark S. Miller <erights@users.noreply.github.com>
  • Loading branch information
kriskowal and erights committed Jul 18, 2022
1 parent f8fe8b3 commit 6d90254
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 0-module-and-module-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ Proposal: https://github.com/whatwg/html/pull/5572
const importHook = async (specifier, importMeta) => {
const url = importMeta.resolve(specifier);
const response = await fetch(url);
const sourceText = await.response.text();
return new Module(sourceText, {
const sourceText = await response.text();
const source = new ModuleSource(sourceText);
return new Module(source, {
importHook,
importMeta: createCustomImportMeta(url),
});
Expand Down

0 comments on commit 6d90254

Please sign in to comment.