From a217f2c769b79053de0053445f02884d62a6779c Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 8 Mar 2024 23:21:06 -0500 Subject: [PATCH] More plugins updates --- .../lib/plugins/assert-against-attrs.ts | 2 +- .../lib/plugins/transform-resolutions.ts | 4 +++- 2 files changed, 4 insertions(+), 2 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 8404d28cb03..af61de1ef06 100644 --- a/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts +++ b/packages/ember-template-compiler/lib/plugins/assert-against-attrs.ts @@ -74,7 +74,7 @@ export default function assertAgainstAttrs(env: EmberASTPluginEnvironment): ASTP } function isAttrs(node: AST.PathExpression, symbols: string[]) { - let name = node.parts[0]; + let name = node.head.original; if (name && symbols.indexOf(name) !== -1) { return false; diff --git a/packages/ember-template-compiler/lib/plugins/transform-resolutions.ts b/packages/ember-template-compiler/lib/plugins/transform-resolutions.ts index 513aa05ff69..b346971e67e 100644 --- a/packages/ember-template-compiler/lib/plugins/transform-resolutions.ts +++ b/packages/ember-template-compiler/lib/plugins/transform-resolutions.ts @@ -149,7 +149,9 @@ export default function transformResolutions(env: EmberASTPluginEnvironment): AS } function isLocalVariable(node: AST.PathExpression, hasLocal: (k: string) => boolean): boolean { - return !node.this && node.parts.length === 1 && hasLocal(node.parts[0]!); + return ( + !(node.head.type === 'ThisHead') && node.tail.length === 1 && hasLocal(node.head.original!) + ); } function transformParams(