Skip to content

Commit

Permalink
More plugins updates
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Mar 22, 2024
1 parent 6297cdb commit 5ec237a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5ec237a

Please sign in to comment.