Skip to content

Commit

Permalink
Remove path.data deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp committed Jul 8, 2024
1 parent 4b047de commit 82e7e62
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/compat/src/resolver-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ class TemplateResolver implements ASTPlugin {
if (isThisHead(node.path)) {
return;
}
if (node.path.data === true) {
if (isAtHead(node.path)) {
return;
}
if (node.path.parts.length > 1) {
Expand Down Expand Up @@ -1173,3 +1173,13 @@ function isThisHead(path: any) {

return path.this === true;
}

function isAtHead(path: any) {
if (!path) return;

if ('head' in path) {
return path.head.type === 'AtHead';
}

return path.data === true;
}

0 comments on commit 82e7e62

Please sign in to comment.