Skip to content

Commit 4a37088

Browse files
Merge pull request #158 from dxc-technology/versions-select
converting version property value to string
2 parents a818622 + 55a99fb commit 4a37088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/dxc-ngx-cdk-site/src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class AppComponent {
2727
this.suscription = this.http.get(portal.url
2828
).subscribe(
2929
(resp: Array<any>) => {
30-
this.versions = resp.map((item) => { return { label: `${item.versionNumber}`, value: item.versionNumber, url: item.versionURL, current: item.current } });
30+
this.versions = resp.map((item) => { return { label: `${item.versionNumber}`, value: `${item.versionNumber}`, url: item.versionURL, current: item.current } });
3131
this.calculateCurrentVersion();
3232
},
3333
err => console.error('Failed when retrieve versions.json from AWS', err));
@@ -41,7 +41,7 @@ export class AppComponent {
4141

4242

4343
selectVersion(value) {
44-
window.location.href = this.versions.find((v) => v.label === value.toString()).url;
44+
window.location.href = this.versions.find((v) => v.label === value).url;
4545
}
4646

4747
ngOnDestroy(): void {

0 commit comments

Comments
 (0)