[FIX] components: do not crash when binding anonymous function

It is not really useful, but it is possible to bind an anonymous
function prop. However, with the recent change on how the bind feature
works, it now crashes.

This commit makes sure that we properly apply the `bind` operation to
the function, and not to the last term of the function.
This commit is contained in:
Géry Debongnie
2023-03-09 15:21:12 +01:00
committed by Sam Degueldre
parent 532ab7fae0
commit 0024f33fa1
5 changed files with 56 additions and 7 deletions
+1 -1
View File
@@ -1135,7 +1135,7 @@ export class CodeGenerator {
name = _name;
switch (suffix) {
case "bind":
value = `${value}.bind(this)`;
value = `(${value}).bind(this)`;
break;
case "alike":
break;