You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2023/01/17 11:07:24 UTC

[GitHub] [brooklyn-ui] jathanasiou opened a new pull request, #370: fix for missing version in 'View in Catalog' link

jathanasiou opened a new pull request, #370:
URL: https://github.com/apache/brooklyn-ui/pull/370

   Refactoring to avoid regression from previous changes that caused the "version" URL components of this link to be `undefined`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [brooklyn-ui] asfgit merged pull request #370: fix for missing version in 'View in Catalog' link

Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit merged PR #370:
URL: https://github.com/apache/brooklyn-ui/pull/370


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [brooklyn-ui] ahgittin commented on pull request #370: fix for missing version in 'View in Catalog' link

Posted by "ahgittin (via GitHub)" <gi...@apache.org>.
ahgittin commented on PR #370:
URL: https://github.com/apache/brooklyn-ui/pull/370#issuecomment-1403717667

   :+1: even better


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [brooklyn-ui] ahgittin commented on a diff in pull request #370: fix for missing version in 'View in Catalog' link

Posted by "ahgittin (via GitHub)" <gi...@apache.org>.
ahgittin commented on code in PR #370:
URL: https://github.com/apache/brooklyn-ui/pull/370#discussion_r1086550577


##########
ui-modules/blueprint-composer/app/components/catalog-saver/catalog-saver.directive.js:
##########
@@ -208,12 +208,14 @@ export function CatalogItemModalController($scope, $filter, blueprintService, pa
     };
 
     $scope.getCatalogURL = () => {
+        const urlPartVersion = $scope.config.current.version || $scope.config.version;

Review Comment:
   is `$scope.config.current` guaranteed to be an object at this point?  if not we risk introducing errors with this change.
   
   i'm usually inclined to be defensive eg
   
   `urlPartVersion = ($scope.config.current || {}).version || $scope.config.version`
   
   and possibly an `if (!urlPartVersion) return '';` (though this is _more_ defensive than it was previously)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org