ahgittin commented on a change in pull request #263:
URL: https://github.com/apache/brooklyn-ui/pull/263#discussion_r684040900
##########
File path:
ui-modules/blueprint-composer/app/components/util/model/entity.model.js
##########
@@ -685,7 +685,17 @@ function addConfigKeyDefinition(param, overwrite,
skipUpdatesDuringBatch) {
let key = (param || {}).name;
if (!key) throw new Error("'name' field must be included when adding
parameter; was", param);
- allConfig[key] = Object.assign(allConfig[key] || {}, param, overwrite
? null : allConfig[key]);
+ let paramMapped = Object.assign({}, param);
Review comment:
if `overwrite` was false or set false because `param` was supplied as a
string, then the difference is that the code should do
`Object.assign(parameterItem, allConfig[key])` prior to the
`Object.assign(allConfig[key], parameterItem)` -- the difference being if both
set a value for the same key, which one should be kept. With this change any
key set in the param object will always overwrite such a key in config.
--
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]