Skip to content

Commit

Permalink
Merge pull request #158 from dxc-technology/versions-select
Browse files Browse the repository at this point in the history
converting version property value to string
  • Loading branch information
mawelCaballero authored Nov 10, 2020
2 parents a818622 + 55a99fb commit 4a37088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/dxc-ngx-cdk-site/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class AppComponent {
this.suscription = this.http.get(portal.url
).subscribe(
(resp: Array<any>) => {
this.versions = resp.map((item) => { return { label: `${item.versionNumber}`, value: item.versionNumber, url: item.versionURL, current: item.current } });
this.versions = resp.map((item) => { return { label: `${item.versionNumber}`, value: `${item.versionNumber}`, url: item.versionURL, current: item.current } });
this.calculateCurrentVersion();
},
err => console.error('Failed when retrieve versions.json from AWS', err));
Expand All @@ -41,7 +41,7 @@ export class AppComponent {


selectVersion(value) {
window.location.href = this.versions.find((v) => v.label === value.toString()).url;
window.location.href = this.versions.find((v) => v.label === value).url;
}

ngOnDestroy(): void {
Expand Down

0 comments on commit 4a37088

Please sign in to comment.