Skip to content

Commit

Permalink
Update init hook to use ensureLazyLoadingHash
Browse files Browse the repository at this point in the history
  • Loading branch information
2hu12 authored and stefanpenner committed Mar 27, 2019
1 parent e7353b1 commit d86afa2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/engine-addon.js
Expand Up @@ -18,6 +18,7 @@ const recoverAddons = require('./utils/recover-addons');
const p = require('ember-cli-preprocess-registry/preprocessors');
const shouldCompactReexports = require('./utils/should-compact-reexports');
const appendCompactReexportsIfNeeded = require('./utils/append-compact-reexports-if-needed');
const ensureLazyLoadingHash = require('./utils/ensure-lazy-loading-hash');
const preprocessCss = p.preprocessCss;
const preprocessMinifyCss = p.preprocessMinifyCss;
const BroccoliDebug = require('broccoli-debug');
Expand Down Expand Up @@ -378,13 +379,7 @@ module.exports = {
this._engineConfig = new Map();
this.options = defaultsDeep(options, DEFAULT_CONFIG);

// Ensure lazyLoading is a hash, retain backwards compatibility with using
// a boolean value
if (typeof this.lazyLoading === 'boolean') {
this.lazyLoading = {
enabled: this.lazyLoading,
};
}
ensureLazyLoadingHash(this);

// NOTE: This is a beautiful hack to deal with core object calling toString on the function.
// It'll throw a deprecation warning if this isn't present because it doesn't see a `_super`
Expand Down

0 comments on commit d86afa2

Please sign in to comment.