formula: fix multiline expression parsing
This commit is contained in:
parent
fd1c34928d
commit
2239c06bbb
1 changed files with 4 additions and 0 deletions
|
|
@ -142,6 +142,8 @@ module.exports = class Formula extends _widgets_base {
|
|||
|
||||
var s = this.condition.eval(variables).valueOf()
|
||||
|
||||
if (Array.isArray(s) && s.length == 1) s = s[0]
|
||||
|
||||
this.conditionState = s.data !== undefined ? s.data : s
|
||||
|
||||
} catch(err) {
|
||||
|
|
@ -156,6 +158,8 @@ module.exports = class Formula extends _widgets_base {
|
|||
|
||||
var v = this.formula.eval(variables).valueOf()
|
||||
|
||||
if (Array.isArray(v) && v.length == 1) v = v[0]
|
||||
|
||||
this.value = v.data ? v.data : v
|
||||
|
||||
this.showValue()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue