Skip to content

Commit

Permalink
Merge pull request #20678 from emberjs/fix-ast-deprecation
Browse files Browse the repository at this point in the history
Address a missed deprecation introduced in #20658
  • Loading branch information
chancancode committed Apr 11, 2024
2 parents 11feb3a + e65f40f commit 0b79740
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -107,11 +107,13 @@ export default function assertAgainstAttrs(env: EmberASTPluginEnvironment): ASTP
}

function isAttrs(node: AST.PathExpression, symbols: string[]) {
let name = node.parts[0];
return node.head.type === 'VarHead' && name === 'attrs' && symbols.indexOf(name) === -1;
return (
node.head.type === 'VarHead' &&
node.head.name === 'attrs' &&
symbols.indexOf(node.head.name) === -1
);
}

function isThisDotAttrs(node: AST.PathExpression) {
let name = node.parts[0];
return node.head.type === 'ThisHead' && name === 'attrs';
return node.head.type === 'ThisHead' && node.tail[0] === 'attrs';
}

0 comments on commit 0b79740

Please sign in to comment.