From e65f40f5a8e86404a0242397ccd736f8cd42d75e Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Wed, 10 Apr 2024 18:24:51 -0700 Subject: [PATCH] Address a missed deprecation introduced in #20658 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. --- .../lib/plugins/assert-against-attrs.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts b/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts index 2a0543076d9..f2984a8c3ae 100644 --- a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts +++ b/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts @@ -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'; }