mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] compiler: add _ prefix to local variables while compiling an expression
This commit is contained in:
@@ -330,6 +330,8 @@ export function compileExprToArray(expr: string): Token[] {
|
||||
// This assumes the expression has only one scope (incorrect but "good enough for now")
|
||||
for (const token of tokens) {
|
||||
if (token.type === "SYMBOL" && localVars.has(token.value)) {
|
||||
token.originalValue = token.value;
|
||||
token.value = `_${token.value}`;
|
||||
token.isLocal = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user