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 {
290
290
node instanceof angular . KeyedRead ||
291
291
node instanceof angular . SafeKeyedRead
292
292
) {
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 ;
293
299
return this . #transformReceiverAndName(
294
300
node . receiver ,
295
301
this . #transform< babel . Expression > ( node . key ) ,
296
302
{
297
303
computed : true ,
298
304
optional : node instanceof angular . SafeKeyedRead ,
299
- end : node . sourceSpan . end , // ]
305
+ end : end , // ]
300
306
hasParentParens : isInParentParens ,
301
307
} ,
302
308
) ;
You can’t perform that action at this time.
0 commit comments