From 04a47ded5fdc6a5585496e81bb1e232bcad2f59b Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 29 Mar 2024 15:00:50 -0700 Subject: [PATCH] Remove outdated comment --- .../ember-template-compiler/lib/plugins/utils.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/ember-template-compiler/lib/plugins/utils.ts b/packages/ember-template-compiler/lib/plugins/utils.ts index 34565ecd47d..112ed51df4b 100644 --- a/packages/ember-template-compiler/lib/plugins/utils.ts +++ b/packages/ember-template-compiler/lib/plugins/utils.ts @@ -12,16 +12,12 @@ export function isStringLiteral(node: AST.Expression): node is AST.StringLiteral return node.type === 'StringLiteral'; } -function getLocalName(node: string | AST.VarHead) { - if (typeof node === 'string') return node; - - if (node.type === 'VarHead') { +function getLocalName(node: string | AST.VarHead): string { + if (typeof node === 'string') { + return node; + } else { return node.original; } - - // surely this is wrong? (does it ever occur tho?) - // the type of params is `| Expression`, which isn't possible for block params - return node; } export function trackLocals() {