mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[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:
committed by
Sam Degueldre
parent
532ab7fae0
commit
0024f33fa1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user