You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by iu...@apache.org on 2023/04/11 10:20:17 UTC

[brooklyn-ui] branch master updated: Added check that parsedPlan.services exists before checking its length

This is an automated email from the ASF dual-hosted git repository.

iuliana 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 1e24e63b Added check that parsedPlan.services exists before checking its length
     new d7132563 Merge pull request #376 from iuliana/boolean-box-fix
1e24e63b is described below

commit 1e24e63b429e0002534f97c105bad0f68608b75b
Author: iuliana <iu...@cloudsoft.io>
AuthorDate: Tue Apr 11 10:35:47 2023 +0100

    Added check that parsedPlan.services exists before checking its length
---
 ui-modules/utils/quick-launch/quick-launch.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-modules/utils/quick-launch/quick-launch.js b/ui-modules/utils/quick-launch/quick-launch.js
index d150d3ec..0659d444 100644
--- a/ui-modules/utils/quick-launch/quick-launch.js
+++ b/ui-modules/utils/quick-launch/quick-launch.js
@@ -160,7 +160,7 @@ export function quickLaunchDirective() {
                     result[config.name] = config;
 
                     let configValue = (parsedPlan[BROOKLYN_CONFIG] || {})[config.name];
-                    if (typeof configValue == 'undefined' && parsedPlan.services.length==1) {
+                    if (typeof configValue === 'undefined' &&  parsedPlan.services && parsedPlan.services.length === 1) {
                         configValue = (parsedPlan.services[0] && parsedPlan.services[0][BROOKLYN_CONFIG] || {})[config.name];
                     }