Facyla commented on code in PR #36732:
URL: https://github.com/apache/superset/pull/36732#discussion_r2737272673
##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/transformProps.js:
##########
@@ -24,8 +24,20 @@ export default function transformProps(chartProps) {
selectCountry,
colorScheme,
sliceId,
+ customColorScale,
} = formData;
+ let parsedColorScale = [];
+
+ try {
+ parsedColorScale = customColorScale ? JSON.parse(customColorScale) : [];
Review Comment:
This underlying idea was that only valid JSON should be applied, this is why
that the validation logic is kept very simple: only good config should be used,
otherwise it is ignored.
This also allows to integrate a sample config into the input, which would be
"activated" by removing the surrounding explanation text.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]