widgets: reduce scope of commit 073bf9e857

This commit is contained in:
jean-emmanuel 2021-05-14 10:22:27 +02:00
parent 74ac95bca5
commit ae5ee833b1
2 changed files with 10 additions and 5 deletions

View file

@ -509,11 +509,6 @@ class Widget extends EventEmitter {
jsScope = context || {},
varnumber = 999
if (typeof propValue === 'object' && propValue !== null) {
propValue = JSON.stringify(propValue)
}
if (typeof propValue == 'string') {
propValue = balancedReplace('@', '{', '}', propValue, (content)=>{
@ -777,6 +772,10 @@ class Widget extends EventEmitter {
} catch (err) {}
}
} else if (propValue != null && typeof propValue == 'object') {
for (let k in propValue) {
propValue[k] = this.resolveProp(propName, propValue[k], storeLinks, originalWidget, originalPropName, context)
}
}
return propValue

View file

@ -170,6 +170,12 @@ class Matrix extends Panel {
if (propName === 'props') {
propValue = propValue !== undefined ? propValue : deepCopy(this.props[propName])
if (typeof propValue === 'object' && propValue !== null) {
propValue = JSON.stringify(propValue)
}
var data = []
for (var i = 0; i < this.getProp('quantity'); i++) {
data[i] = super.resolveProp(propName, propValue, storeLinks, originalWidget, originalPropName, {$: i})