Skip to content

Commit

Permalink
Merge pull request #19398 from emberjs/bugfix/ensure-entries-are-avai…
Browse files Browse the repository at this point in the history
…lable

[BUGFIX] Ensure entries are properly defined on loader
  • Loading branch information
Chris Garrett authored Feb 11, 2021
2 parents 9ba3aa5 + 63a24db commit 7c39e15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/ember/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ function defineEmberTemplateCompilerLazyLoad(key) {
configurable: true,
enumerable: true,
get() {
if (require.has('ember-template-compiler')) {
if (has('ember-template-compiler')) {
let templateCompiler = require('ember-template-compiler');

EmberHTMLBars.precompile = EmberHandlebars.precompile = templateCompiler.precompile;
Expand Down Expand Up @@ -863,7 +863,8 @@ Ember.__loader = {
require,
// eslint-disable-next-line no-undef
define,
registry: require.entries,
// eslint-disable-next-line no-undef
registry: typeof requirejs !== 'undefined' ? requirejs.entries : require.entries,
};

export default Ember;
Expand Down
2 changes: 1 addition & 1 deletion packages/loader/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ var define, require;
return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']);
};

require._eak_seen = registry;
require._eak_seen = require.entries = registry;
})();

0 comments on commit 7c39e15

Please sign in to comment.