fix(ivy): sanitize tag name while generating listener function name (#26237)

PR Close #26237
This commit is contained in:
Andrew Kushnir
2018-10-03 10:11:12 -07:00
committed by Alex Rickabaugh
parent 730679964f
commit aaaa34021c
2 changed files with 48 additions and 2 deletions

View File

@ -940,8 +940,9 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
}
private prepareListenerParameter(tagName: string, outputAst: t.BoundEvent): () => o.Expression[] {
const evName = sanitizeIdentifier(outputAst.name);
const functionName = `${this.templateName}_${tagName}_${evName}_listener`;
const evNameSanitized = sanitizeIdentifier(outputAst.name);
const tagNameSanitized = sanitizeIdentifier(tagName);
const functionName = `${this.templateName}_${tagNameSanitized}_${evNameSanitized}_listener`;
return () => {