Skip to content

Commit

Permalink
Avoid injectedFactory.reopenClass
Browse files Browse the repository at this point in the history
  • Loading branch information
locks committed Jan 20, 2017
1 parent d69f8d3 commit 5b2dc4d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/container/lib/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,10 @@ function deprecatedFactoryFor(container, fullName, options = {}) {
} else {
let injections = injectionsFor(container, fullName);
let cacheable = !areInjectionsDynamic(injections);

let injectedFactory = factory.extend(injections);
let injectedFactory = factory.extend(injections, { [NAME_KEY]: registry.makeToString(factory, fullName) });

// TODO - remove all `container` injections when Ember reaches v3.0.0
injectDeprecatedContainer(injectedFactory.prototype, container);
injectedFactory.reopenClass({ [NAME_KEY]: registry.makeToString(factory, fullName) });

if (factory && typeof factory._onLookup === 'function') {
factory._onLookup(fullName);
Expand Down

0 comments on commit 5b2dc4d

Please sign in to comment.