From 17159a948daddc3ea7d9fee9ed920888d6b5b33d Mon Sep 17 00:00:00 2001 From: Drew Dara-Abrams Date: Tue, 23 Apr 2024 10:34:42 -0700 Subject: [PATCH] when warning about the freshness of GTFS feeds on an operator page, only warn based on the most recent feed --- src/runtime/components/pages/operator.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/components/pages/operator.vue b/src/runtime/components/pages/operator.vue index 695972f..111c577 100644 --- a/src/runtime/components/pages/operator.vue +++ b/src/runtime/components/pages/operator.vue @@ -257,7 +257,9 @@ export default { }, computed: { dataFreshness () { - if (this.agencies.length > 0) { return this.agencies[0].feed_version.fetched_at } + if (this.agencies.length > 0) { + return this.agencies.map(a => a.feed_version.fetched_at).sort((a, b) => new Date(a) < new Date(b))[0] + } return null }, locations () {