From 6040cc3bf318f77b8edab6e9a04bdb3812f66b08 Mon Sep 17 00:00:00 2001 From: Nick Gottlieb Date: Wed, 29 May 2024 11:45:22 -0700 Subject: [PATCH] fix beta box to use gagesWithGauge instead of gages --- .../components/main-tab/components/beta-box/beta-box.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/views/river-detail/components/main-tab/components/beta-box/beta-box.vue b/src/app/views/river-detail/components/main-tab/components/beta-box/beta-box.vue index cbaa36a0..c8804e07 100644 --- a/src/app/views/river-detail/components/main-tab/components/beta-box/beta-box.vue +++ b/src/app/views/river-detail/components/main-tab/components/beta-box/beta-box.vue @@ -221,7 +221,6 @@ export default { }, gagesWithGage () { return (this.gages?.filter(x => x.gauge && !x.excluded) ?? []).sort((a, b) => { - //sort by primary over secondary if (a.delay_update - b.delay_update) { return a.delay_update - b.delay_update @@ -235,9 +234,8 @@ export default { }, reachGage () { - - if (this.river && this.river.readingsummary && this.gages) { - return this.gages.find(g => g.gauge.id.toString() === this.river.readingsummary.gauge_id.toString()) + if (this.river && this.river.readingsummary) { + return this.gagesWithGage.find(g => g.gauge.id.toString() === this.river.readingsummary.gauge_id.toString()) } return this.gagesWithGage[0] }