mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] compiler: never add _ prefix to non variable token
This commit is contained in:
@@ -329,7 +329,7 @@ export function compileExprToArray(expr: string): Token[] {
|
||||
// Mark all variables that have been used locally.
|
||||
// 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)) {
|
||||
if (token.type === "SYMBOL" && token.varName && localVars.has(token.value)) {
|
||||
token.originalValue = token.value;
|
||||
token.value = `_${token.value}`;
|
||||
token.isLocal = true;
|
||||
|
||||
Reference in New Issue
Block a user