Commit fadaaccf authored by Ralf Zimmermann's avatar Ralf Zimmermann Committed by Anja Leichsenring
Browse files

[BUGFIX] EXT:form - editor error on mixed option key types

Let the JavaScript 'Inspector-PropertyGridEditor' deal with mixed
option value types (string / int)

Resolves: #79457
Releases: master
Change-Id: I7e9a377d9a5d6e9f1336c25bc114c974a70b7284
Reviewed-on: https://review.typo3.org/51421

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent d918102b
......@@ -1372,9 +1372,16 @@ define(['jquery',
}
setData(propertyData[propertyDataKey], propertyDataKey);
}
} else {
for (var i = 0, len = propertyData.length; i < len; ++i) {
setData(propertyData[i]['_label'], propertyData[i]['_value']);
} else if ('array' === $.type(propertyData)) {
for (var propertyDataKey in propertyData) {
if (!propertyData.hasOwnProperty(propertyDataKey)) {
continue;
}
if (getUtility().isUndefinedOrNull(propertyData[propertyDataKey]['_label'])) {
setData(propertyData[propertyDataKey], propertyDataKey);
} else {
setData(propertyData[propertyDataKey]['_label'], propertyData[propertyDataKey]['_value']);
}
}
}
};
......
......@@ -1012,8 +1012,15 @@ define(['jquery',
appendMultiValue(propertyValue[propertyValueKey], propertyValueKey, defaultValue);
}
} else if ('array' === $.type(propertyValue)) {
for (var i = 0, len = propertyValue.length; i < len; ++i) {
appendMultiValue(propertyValue[i]['_label'], propertyValue[i]['_value'], defaultValue);
for (var propertyValueKey in propertyValue) {
if (!propertyValue.hasOwnProperty(propertyValueKey)) {
continue;
}
if (getUtility().isUndefinedOrNull(propertyValue[propertyValueKey]['_label'])) {
appendMultiValue(propertyValue[propertyValueKey], propertyValueKey, defaultValue);
} else {
appendMultiValue(propertyValue[propertyValueKey]['_label'], propertyValue[propertyValueKey]['_value'], defaultValue);
}
}
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment