advanced syntaxes (VAR{}): ignore quotes around variable name

This commit is contained in:
bordun 2021-05-08 16:17:43 +02:00
parent 41ff331235
commit c1669cd03d
2 changed files with 8 additions and 1 deletions

View file

@ -644,6 +644,12 @@ class Widget extends EventEmitter {
} catch (err) {}
}
if (
// remove quotes
(name[0] === '"' && name[name.length - 1] === '"') ||
(name[0] === '\'' && name[name.length - 1] === '\'') ||
) name = name.slice(1, name.length - 1)
if (!this.variables[name]) {
this.variables[name] = {default: value, value: value, propNames: [propName]}