Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
- Handle case where there's only one visit when creating chunks (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hardiesoft committed Jul 21, 2021
1 parent 4ce0628 commit 997690b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/VisitsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export default {
const fromDate = new Date(visit.timeStart);
const toDate = new Date(visit.timeEnd);
if (
(newVisits.length === 1 && this.loadedVisitsCount === 0) ||
(newVisits.filter((v) => v.hasOwnProperty("device")).length === 1 && // Edge case with only 1 visit
this.loadedVisitsCount === 0 &&
items.length === 1) ||
prevFromDate === null ||
startOfEvening(fromDate).getTime() !==
startOfEvening(prevFromDate).getTime()
Expand Down
3 changes: 2 additions & 1 deletion src/views/StationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
style="color: #666; font-size: 16px"
/>
<font-awesome-icon icon="map-marker-alt" size="xs" />
<span>{{ stationName }}</span> <span v-if="stationIsRetired">(retired)</span>
<span>{{ stationName }}</span>
<span v-if="stationIsRetired">(retired)</span>
</h1>
</div>
<div>
Expand Down

0 comments on commit 997690b

Please sign in to comment.