Revert "refactor(ivy): clean up (#23899)"

This reverts commit 856ee73464.
This commit is contained in:
Victor Berchet
2018-06-06 13:38:13 -07:00
parent 31988a6ff9
commit 24ab0a7db0
2 changed files with 6 additions and 3 deletions

View File

@ -315,12 +315,12 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
this._creationCode.push(...i18nMessages);
}
const isEmptyElement = element.outputs.length === 0 && element.children.length === 0;
let isSelfClosingElement = element.outputs.length === 0 && element.children.length === 0;
const implicit = o.variable(CONTEXT_NAME);
if (isEmptyElement) {
if (isSelfClosingElement) {
this.instruction(
this._creationCode, element.sourceSpan, R3.element, ...trimTrailingNulls(parameters));
} else {
@ -377,7 +377,7 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
t.visitAll(this, element.children);
}
if (!isEmptyElement) {
if (!isSelfClosingElement) {
// Finish element construction mode.
this.instruction(
this._creationCode, element.endSourceSpan || element.sourceSpan, R3.elementEnd);