Skip to content

Commit

Permalink
fix: show latest lhr date in url detail (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon authored Jul 31, 2022
1 parent 908c44c commit fd15cdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion report/www/src/components/UrlHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { btoa } from "../utils";
const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || "";

export const UrlHeader = ({ report, url }) => {
const updateDate = report && report.lhr && report.lhr.fetchTime;
const lhrReports =
report.lhr && Array.isArray(report.lhr) ? report.lhr : [report.lhr];
const updateDate = lhrReports && lhrReports.length && lhrReports[0].fetchTime;
return (
<Callout hasInfoIcon={false} className="fr-mb-3w">
<CalloutTitle as="h4">
Expand Down

0 comments on commit fd15cdd

Please sign in to comment.