Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix(service offering): fix service offering dialog bug (#441)
Browse files Browse the repository at this point in the history
fix service offering dialog bug
  • Loading branch information
Darya Baklanova authored Aug 23, 2017
1 parent 080c1a5 commit 1ab7a51
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ export class ServiceOfferingDialogComponent implements OnInit {
private fetchData(zone: Zone): Observable<Array<ServiceOffering>> {
return this.serviceOfferingFilterService.getAvailableByResources({ zone })
.map(availableOfferings => {
return availableOfferings.filter(offering => {
return offering.id !== this.virtualMachine.serviceOffering.id;
});
return !!this.virtualMachine.serviceOffering
? availableOfferings.filter(
offering =>
offering.id !== this.virtualMachine.serviceOffering.id)
: availableOfferings;
})
.switchMap(offerings => {
const offeringsWithSetParams = offerings.map(offering => {
Expand Down

0 comments on commit 1ab7a51

Please sign in to comment.