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 0dc1f46  fix error where it assumed getLayers was set
0dc1f46 is described below

commit 0dc1f46bd51435f392d2e001060a0fade9c9ae61
Author: Alex Heneveld <[email protected]>
AuthorDate: Tue Jun 1 11:03:12 2021 +0100

    fix error where it assumed getLayers was set
---
 ui-modules/blueprint-composer/app/views/main/main.controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-modules/blueprint-composer/app/views/main/main.controller.js 
b/ui-modules/blueprint-composer/app/views/main/main.controller.js
index 261e294..54a7db1 100644
--- a/ui-modules/blueprint-composer/app/views/main/main.controller.js
+++ b/ui-modules/blueprint-composer/app/views/main/main.controller.js
@@ -70,7 +70,7 @@ export function MainController($scope, $element, $log, 
$state, $stateParams, brB
     });
 
     let layersM = {};
-    (composerOverrides.getLayers() || LAYERS).forEach(l => layersM[l.id] = l);
+    (composerOverrides.getLayers && composerOverrides.getLayers() || 
LAYERS).forEach(l => layersM[l.id] = l);
 
     let layersL = localStorage && localStorage.getItem(LAYER_CACHE_KEY) !== 
null && JSON.parse(localStorage.getItem(LAYER_CACHE_KEY));
     if (layersL) layersL.forEach(l => { if (layersM[l.id]) layersM[l.id] = 
Object.assign({}, layersM[l.id], l); });

Reply via email to