Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new resolveRegistration #499

Merged
merged 1 commit into from
Nov 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ember_debug/data-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ export default EmberObject.extend(PortMixin, {
}),

_resolve(name) {
const container = this.get('application').__container__;
// Ember >= 2.1
if (this.get('application').resolveRegistration) {
return this.get('application').resolveRegistration(name);
}
let container = this.get('application').__container__;
let registry = this.get('application.registry');
if (registry) {
// Ember >= 1.11
return registry.resolve(name);
} else if (container.resolve) {
// Ember < 1.11
return container.resolve(name);
} else if (container.resolveRegistration) {
// Ember >= 2.1
return container.resolveRegistration(name);
} else {
// Ember >= 2.0 < 2.1
return container.registry.resolve(name);
Expand Down