Skip to content

Commit

Permalink
fix beta box to use gagesWithGauge instead of gages
Browse files Browse the repository at this point in the history
  • Loading branch information
ngottlieb committed May 29, 2024
1 parent 935d0bc commit 6040cc3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
}
Expand Down

0 comments on commit 6040cc3

Please sign in to comment.