From 28430cdd557e54384975ee960faf153975848ef0 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 31 Mar 2022 10:50:19 +0200 Subject: [PATCH] matrix: fix props resolution issue with object properties --- src/client/widgets/containers/matrix.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/widgets/containers/matrix.js b/src/client/widgets/containers/matrix.js index 8730d89e..3b1e1391 100644 --- a/src/client/widgets/containers/matrix.js +++ b/src/client/widgets/containers/matrix.js @@ -178,24 +178,23 @@ class Matrix extends Panel { this.resolveLock = true - propValue = propValue !== undefined ? propValue : deepCopy(this.props[propName]) + propValue = propValue !== undefined ? propValue : this.props[propName] var data = [], quantity = this.resolveProp('quantity', undefined, false, false, false) if (typeof propValue === 'object' && propValue !== null && !Array.isArray(propValue)) { - for (let i = 0; i < quantity; i++) { data[i] = {} for (var k in propValue) { - data[i][k] = super.resolveProp(propName, propValue[k], i === 0 ? storeLinks : false, originalWidget, originalPropName, {$: i}) + data[i][k] = super.resolveProp(propName, deepCopy(propValue[k]), i === 0 ? storeLinks : false, originalWidget, originalPropName, {$: i}) } } } else { for (let i = 0; i < quantity; i++) { - data[i] = super.resolveProp(propName, propValue, i === 0 ? storeLinks : false, originalWidget, originalPropName, {$: i}) + data[i] = super.resolveProp(propName, deepCopy(propValue), i === 0 ? storeLinks : false, originalWidget, originalPropName, {$: i}) } }