Skip to content

Commit

Permalink
Fix wrong usage of exports
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Sep 13, 2024
1 parent cc98c20 commit c1b4272
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ exports.clientExportsESM = function clientExportsESM(
typeof moduleExports.then === 'function'
) {
return moduleExports.then(
exports => createClientReferencesForExports({exports, async: true}),
asyncModuleExports =>
createClientReferencesForExports({
exports: asyncModuleExports,
async: true,
}),
() => {},
);
}

return createClientReferencesForExports({exports});
return createClientReferencesForExports({exports: moduleExports});
};

// This tests server to server references. There's another case of client to server references.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,16 @@ exports.clientExportsESM = function clientExportsESM(
typeof moduleExports.then === 'function'
) {
return moduleExports.then(
exports => createClientReferencesForExports({exports, async: true}),
asyncModuleExports =>
createClientReferencesForExports({
exports: asyncModuleExports,
async: true,
}),
() => {},
);
}

return createClientReferencesForExports({exports});
return createClientReferencesForExports({exports: moduleExports});
};

// This tests server to server references. There's another case of client to server references.
Expand Down

0 comments on commit c1b4272

Please sign in to comment.