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

cleanup _lookupPartial #16793

Merged
merged 1 commit into from
Jul 12, 2018
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: 2 additions & 7 deletions packages/ember-glimmer/lib/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,16 @@ export default class RuntimeResolver implements IRuntimeResolver<OwnedTemplateMe

private _lookupPartial(name: string, meta: OwnedTemplateMeta): PartialDefinition {
const template = lookupPartial(name, meta.owner);
const partial = new PartialDefinition(name, lookupPartial(name, meta.owner));

if (template) {
return partial;
return new PartialDefinition(name, template);
} else {
throw new Error(`${name} is not a partial`);
}
}

private _lookupModifier(name: string) {
let modifier = this.builtInModifiers[name];
if (modifier !== undefined) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is already undefined check downstream in handle method, so this looks unnecessary

return modifier;
}
return null;
return this.builtInModifiers[name];
}

private _parseNameForNamespace(_name: string) {
Expand Down