Skip to content

Commit

Permalink
Merge pull request #2433 from cloudfoundry-incubator/fix-space
Browse files Browse the repository at this point in the history
Fix exception when a space is added to an empty org
  • Loading branch information
nwmac authored Jun 19, 2018
2 parents 25c11fc + d8595c8 commit cc472b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class CardCfRecentAppsComponent implements OnInit {
!!this.activeRouteCfOrgSpace.orgGuid && org.metadata.guid === this.activeRouteCfOrgSpace.orgGuid);
}),
map((orgs: APIResource<IOrganization>[]) => {
return [].concat(...orgs.map((org) => org.entity.spaces));
return [].concat(...orgs.map((org) => org.entity.spaces ? org.entity.spaces : []));
}),
map((spaces: APIResource<ISpace>[]) => {
return spaces.filter((space) => !this.activeRouteCfOrgSpace.spaceGuid ||
Expand Down

0 comments on commit cc472b5

Please sign in to comment.