fix(compiler): fix Elements not making a new ParseSourceSpan (#31190)
Change the Element constructor in r3_ast to create a new ParseSourceSpan when regenerating it rather than extending an object, which does not contain the overloaded toString(). PR Close #31190
This commit is contained in:

committed by
Kara Erickson

parent
9c06af2dfc
commit
7035f225ad
@ -72,7 +72,7 @@ export class Element implements Node {
|
||||
public endSourceSpan: ParseSourceSpan|null, public i18n?: I18nAST) {
|
||||
// If the element is empty then the source span should include any closing tag
|
||||
if (children.length === 0 && startSourceSpan && endSourceSpan) {
|
||||
this.sourceSpan = {...sourceSpan, end: endSourceSpan.end};
|
||||
this.sourceSpan = new ParseSourceSpan(sourceSpan.start, endSourceSpan.end);
|
||||
}
|
||||
}
|
||||
visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitElement(this); }
|
||||
|
Reference in New Issue
Block a user