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

commit 617623e35317c10876cac58baff69825ed385d42
Author: John Athanasiou <[email protected]>
AuthorDate: Wed Jan 25 13:57:25 2023 +0000

    more defensive deep property usage
---
 .../app/components/catalog-saver/catalog-saver.directive.js            | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
 
b/ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
index 4d01c15f..946ebe2d 100644
--- 
a/ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
+++ 
b/ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js
@@ -208,7 +208,8 @@ export function CatalogItemModalController($scope, $filter, 
blueprintService, pa
     };
 
     $scope.getCatalogURL = () => {
-        const urlPartVersion = $scope.config.current.version || 
$scope.config.version;
+        const urlPartVersion = _.get($scope, 'config.current.version') || 
_.get($scope, 'config.version');
+        if (!urlPartVersion) return "";
 
         switch ($scope.state.view) {
             case VIEWS.form:

Reply via email to