Skip to content

Commit

Permalink
fix(google): GCE create server group and load balancer fixes (#6806)
Browse files Browse the repository at this point in the history
* fix(google): safe call of onTypeChanged in v2InstanceTypeSelector

* fix(google): safe lookup and set of namedPorts in loadBalancingPolicySelector
  • Loading branch information
maggieneterval authored Apr 2, 2019
1 parent 700b8f6 commit bdcbc97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class V2InstanceTypeSelectorController implements IComponentController {
this.command.viewState.instanceTypeDetails = instanceTypeDetails;
});

this.onTypeChanged(this.command.instanceType);
this.onTypeChanged && this.onTypeChanged(this.command.instanceType);
};

public getStorageDescription = (instanceType: IPreferredInstanceType) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class GceLoadBalancingPolicySelectorController implements IController {
}

public addNamedPort() {
if (!this.command.loadBalancingPolicy.namedPorts) {
this.command.loadBalancingPolicy.namedPorts = [];
if (!get(this.command, 'loadBalancingPolicy.namedPorts')) {
set(this.command, 'loadBalancingPolicy.namedPorts', []);
}

this.command.loadBalancingPolicy.namedPorts.push({ name: '', port: 80 });
Expand Down

0 comments on commit bdcbc97

Please sign in to comment.