fix(service-details): fix an update issue when no ports are defined (#765)

pull/695/merge
Anthony Lapenna 8 years ago committed by GitHub
parent 80a0a15490
commit 3fc54c095e

@ -198,11 +198,13 @@ function ($scope, $stateParams, $state, $location, $anchorScroll, Service, Servi
Window: service.RestartWindow
};
service.Ports.forEach(function (binding) {
if (binding.PublishedPort === null || binding.PublishedPort === '') {
delete binding.PublishedPort;
}
});
if (service.Ports) {
service.Ports.forEach(function (binding) {
if (binding.PublishedPort === null || binding.PublishedPort === '') {
delete binding.PublishedPort;
}
});
}
config.EndpointSpec = {
Mode: config.EndpointSpec.Mode || 'vip',

Loading…
Cancel
Save