iuliana commented on a change in pull request #284:
URL: https://github.com/apache/brooklyn-ui/pull/284#discussion_r708134930
##########
File path:
ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
##########
@@ -72,23 +72,26 @@ function BlueprintService($log, $q, $sce, paletteApi,
iconGenerator, dslService,
config
.filter(item => item instanceof Dsl)
.reduce((set, config) => {
- config.relationships.forEach((entity) => {
- if (entity !== null) {
- set.add({entity: entity, name: key});
- }
- });
+ config.relationships.forEach((entity) => {
+ if (entity !== null) {
+ set.add({entity: entity, name:
key});
+ }
+ });
return set;
}, set);
}
if (config instanceof Object) {
Object.keys(config)
.filter(objectKey => config[objectKey] instanceof
Dsl)
.reduce((set, objectKey) => {
- config[key].relationships.forEach((entity)=> {
- if (entity !== null) {
- set.add({entity: entity, name: key});
- }
- });
+ if(config[key]) { // when config[objectKey]
value is a DSL, but the config does not have a [key] property
+ console.log("testing this: " ,
config[key], key, config, objectKey);
Review comment:
Yup, forgot the logging statement in there. good catch. :D
--
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]