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 2022/06/09 18:42:22 UTC

[brooklyn-ui] branch master updated: Fixed bug caused by object-based based constraints - no toUpperCase function

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 2169e60d Fixed bug caused by object-based based constraints - no toUpperCase function
     new 84bc1ff6 Merge pull request #329 from iuliana/fix/required-missing
2169e60d is described below

commit 2169e60d2d7832b21ee05c3878416dff03d48950
Author: iuliana <iu...@cloudsoft.io>
AuthorDate: Mon Jun 6 16:45:35 2022 +0100

    Fixed bug caused by object-based based constraints - no toUpperCase function
---
 ui-modules/catalog/app/views/bundle/type/type.state.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui-modules/catalog/app/views/bundle/type/type.state.js b/ui-modules/catalog/app/views/bundle/type/type.state.js
index b65f99f6..06251c9d 100644
--- a/ui-modules/catalog/app/views/bundle/type/type.state.js
+++ b/ui-modules/catalog/app/views/bundle/type/type.state.js
@@ -73,7 +73,8 @@ export function typeController($scope, $state, $stateParams, $q, $uibModal, brBr
 
     $scope.composerUrl = brBrandInfo.blueprintComposerBaseUrl;
 
-    $scope.hasEntry = (list, v) => list.find((entry) => entry.toUpperCase() == v.toUpperCase());
+    // needed to avoid bug cause by object-based constraints
+    $scope.hasEntry = (list, v) => list.find((entry) => (typeof entry === 'string') &&  entry.toUpperCase() === v.toUpperCase());
 
     $scope.deploy = (event) => {
         const instance = $uibModal.open({