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

fix(glimmer-wrapper): add normalize method for Registry#has #300

Merged
merged 2 commits into from Dec 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion mu-trees/addon/resolvers/glimmer-wrapper/index.js
Expand Up @@ -81,7 +81,15 @@ const Resolver = GlobalsResolver.extend({
this._glimmerResolver = new GlimmerResolver(this.config, this.glimmerModuleRegistry);
},

normalize: null,
normalize(specifier) {
buschtoens marked this conversation as resolved.
Show resolved Hide resolved
// This method is called by `Registry#validateInjections` in dev mode.
// https://github.com/ember-cli/ember-resolver/issues/299
const [type, name] = specifier.split(':', 2);
if (name && (type === 'service' || type === 'controller')) {
return `${type}:${dasherize(name)}`;
}
return specifier;
},

expandLocalLookup(specifier, source, namespace) {
if (isAbsoluteSpecifier(specifier)) {
Expand Down