This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
The following commit(s) were added to refs/heads/master by this push:
new e8d162a fix NPE thrown in ui for locations without display name
e8d162a is described below
commit e8d162a5a5ae272f97a589639bef791fdb755998
Author: Alex Heneveld <[email protected]>
AuthorDate: Tue Jan 18 10:32:38 2022 +0000
fix NPE thrown in ui for locations without display name
---
.../app/components/providers/palette-api.provider.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/ui-modules/blueprint-composer/app/components/providers/palette-api.provider.js
b/ui-modules/blueprint-composer/app/components/providers/palette-api.provider.js
index 17bca9b..3f2fc75 100644
---
a/ui-modules/blueprint-composer/app/components/providers/palette-api.provider.js
+++
b/ui-modules/blueprint-composer/app/components/providers/palette-api.provider.js
@@ -75,7 +75,7 @@ class PaletteApiProvider extends PaletteApi {
let supertypes = ['org.apache.brooklyn.api.location'];
return locations.map(location => {
if (location.catalog) {
- location.catalog.displayName = location.config.displayName;
+ location.catalog.displayName = location.config ?
location.config.displayName : location.name;
location.catalog.supertypes = supertypes;
return location.catalog;
}
@@ -95,4 +95,4 @@ class PaletteApiProvider extends PaletteApi {
create(bom, params) {
return this.catalogApi.create(bom, params);
}
-}
\ No newline at end of file
+}