mitchell852 commented on a change in pull request #5072:
URL: https://github.com/apache/trafficcontrol/pull/5072#discussion_r495124522
##########
File path: traffic_portal/app/src/common/modules/header/HeaderController.js
##########
@@ -23,9 +23,9 @@ var HeaderController = function($rootScope, $scope, $state,
$uibModal, $location
$scope.userLoaded = userModel.loaded;
- $scope.enviroName = propertiesModel.properties.environment.name;
+ $scope.enviroName = (propertiesModel.properties.environment) ?
propertiesModel.properties.environment.name : '';
Review comment:
yeah, it won't find `.name` so it will treat it as undefined and the UI
will cast undefined to a string. so works very well. same with `.isProd`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]