File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -290,13 +290,19 @@ class Transformer extends Source {
290290 node instanceof angular . KeyedRead ||
291291 node instanceof angular . SafeKeyedRead
292292 ) {
293+ // TODO: Use `node.sourceSpan.end` directly
294+ // https://github.com/angular/angular/issues/62617
295+ const end =
296+ this . text . charAt ( node . sourceSpan . end - 1 ) === '='
297+ ? this . getCharacterLastIndex ( / \S / , node . sourceSpan . end - 2 ) + 1
298+ : node . sourceSpan . end ;
293299 return this . #transformReceiverAndName(
294300 node . receiver ,
295301 this . #transform< babel . Expression > ( node . key ) ,
296302 {
297303 computed : true ,
298304 optional : node instanceof angular . SafeKeyedRead ,
299- end : node . sourceSpan . end , // ]
305+ end : end , // ]
300306 hasParentParens : isInParentParens ,
301307 } ,
302308 ) ;
You can’t perform that action at this time.
0 commit comments