Skip to content

Commit ecc458f

Browse files
authored
Merge pull request #343 from usnistgov/fix/home-page-releases-should-point-to-pdr-landing-page
Make “Latest Releases” cards open PDR landing pages
2 parents 0c10398 + bb54857 commit ecc458f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

angular/src/app/home/home.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -948,14 +948,18 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
948948

949949
private resolveDatasetLandingPage(dataset: any): string {
950950
if (!dataset) return "";
951+
952+
// Prefer PDR landing page (matches search results title behavior)
953+
if (this.PDRAPIURL && dataset?.ediid) {
954+
return `${this.PDRAPIURL}${dataset.ediid}`;
955+
}
956+
951957
const rawLanding =
952958
typeof dataset.landingPage === "string" ? dataset.landingPage.trim() : "";
953959
if (rawLanding.length) {
954960
return rawLanding;
955961
}
956-
if (this.PDRAPIURL && dataset?.ediid) {
957-
return `${this.PDRAPIURL}${dataset.ediid}`;
958-
}
962+
959963
return "";
960964
}
961965

0 commit comments

Comments
 (0)