Skip to content

Commit

Permalink
Address a missed deprecation introduced in #20658
Browse files Browse the repository at this point in the history
It wasn't a "real" Ember deprecation so didn't go through the infra
that would have caused a test failure, just spewing a lot of logs
to the console.
  • Loading branch information
chancancode committed Apr 11, 2024
1 parent 11feb3a commit e65f40f
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 e65f40f

Please sign in to comment.