Skip to content

Commit

Permalink
Fix the portDefinition transform util
Browse files Browse the repository at this point in the history
Adjust the portDefinition transform util to handle undefined port
definitions; this fixes an issue wich prevented users from editing app
configurations if `portMappings.containerPort` is undefined.

Closes mesosphere/marathon#4340
  • Loading branch information
Orlando Hohmeier committed Sep 20, 2016
1 parent 4ad059e commit b32fa61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/stores/transforms/AppFormModelToFieldTransforms.js
Expand Up @@ -3,6 +3,10 @@ import HealthCheckPortTypes from "../../constants/HealthCheckPortTypes";
import Util from "../../helpers/Util";

function transformPortDefinitionRows(portDefinitionRows, portField) {
if (portDefinitionRows == null) {
return [];
}

return portDefinitionRows.map((row, i) => {
row[portField] = row[portField];
row.consecutiveKey = i;
Expand Down

0 comments on commit b32fa61

Please sign in to comment.