Skip to content

Commit

Permalink
fix(cf): fix deploy service manifest artifact selection (#7059)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Schneider authored and Jammy Louie committed May 23, 2019
1 parent 50f23fc commit b712673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export class CloudfoundryDeployServiceStageConfig extends React.Component<
};

public render() {
const { pipeline } = this.props;
const { credentials, region, userProvided, stage, manifest } = this.props.stage;
const { pipeline, stage } = this.props;
const { credentials, region, userProvided, manifest } = this.props.stage;
const { accounts, regions } = this.state;
const directInput = !manifest || !!manifest.direct;
let manifestInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ interface IServiceFieldValidatorConfig extends IValidatorConfig {
}

const sourceType = (manifest: ICloudFoundryServiceManifestSource, userProvided: boolean) => {
if (manifest.direct) {
if (manifest && manifest.direct) {
return userProvided ? 'userProvided' : 'direct';
} else {
return 'artifact';
}
};

const sourceStruct = (manifest: ICloudFoundryServiceManifestSource) => {
return manifest.direct ? 'direct' : 'artifact';
return manifest && manifest.direct ? 'direct' : 'artifact';
};

PipelineConfigValidator.registerValidator(
Expand Down

0 comments on commit b712673

Please sign in to comment.