Skip to content

Commit

Permalink
chore(compartment-mapper): add note about fishy code
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Sep 20, 2024
1 parent b8c9a48 commit 633c304
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/compartment-mapper/src/import-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export const loadFromMap = async (readPowers, compartmentMap, options = {}) => {
} else {
// sync module transforms are allowed, because they are "compatible"
// with async module transforms (not vice-versa)

// this needs to be done _here_ in the case that `syncModuleTranforms` was provided
// against an otherwise-async operation.
const moduleTransforms = /** @type {ModuleTransforms} */ ({
...behavior.options.syncModuleTransforms,
...behavior.options.moduleTransforms,
Expand Down

0 comments on commit 633c304

Please sign in to comment.