Skip to content

Commit

Permalink
Bugfix: new loader feature was missing cacheability
Browse files Browse the repository at this point in the history
#20675 included a small addition to the basic AMD loader that ships inside ember-source for use in node. I added the ability to register a whole preexisting module.

But when using that feature, we don't stick the results into the seen cache, so subsequent requests will see an empty module.
  • Loading branch information
ef4 committed May 13, 2024
1 parent fbe8738 commit 10a2345
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Empty file.
2 changes: 1 addition & 1 deletion packages/loader/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var define, require;

var result = callback.apply(this, reified);
if (!deps.includes('exports') || result !== undefined) {
exports = result;
exports = seen[name] = result;
}

return exports;
Expand Down

0 comments on commit 10a2345

Please sign in to comment.