Skip to content

Commit f34a651

Browse files
jerryorta-devvictoriaaa234
authored andcommitted
fix(schematic): parse5 v5.0.0 requires different parse options (#12028)
Fixes #12027
1 parent 004a096 commit f34a651

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/schematics/utils/html.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {Project} from './devkit-utils/config';
1111
*/
1212
export function getHeadTag(host: Tree, src: string) {
1313
const document = parse5.parse(src,
14-
{locationInfo: true}) as parse5.AST.Default.Document;
14+
{sourceCodeLocationInfo: true}) as parse5.AST.Default.Document;
1515

1616
let head;
1717
const visit = (nodes: parse5.AST.Default.Node[]) => {
@@ -34,7 +34,7 @@ export function getHeadTag(host: Tree, src: string) {
3434
}
3535

3636
return {
37-
position: head.__location.startTag.endOffset
37+
position: head.sourceCodeLocation.startTag.endOffset
3838
};
3939
}
4040

0 commit comments

Comments
 (0)