We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a957af4 commit e7ba5c6Copy full SHA for e7ba5c6
1 file changed
src/transform-node.ts
@@ -290,13 +290,19 @@ class Transformer extends Source {
290
node instanceof angular.KeyedRead ||
291
node instanceof angular.SafeKeyedRead
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;
299
return this.#transformReceiverAndName(
300
node.receiver,
301
this.#transform<babel.Expression>(node.key),
302
{
303
computed: true,
304
optional: node instanceof angular.SafeKeyedRead,
- end: node.sourceSpan.end, // ]
305
+ end: end, // ]
306
hasParentParens: isInParentParens,
307
},
308
);
0 commit comments