Skip to content

Commit

Permalink
Fix lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
stevie.hartog committed Jun 4, 2024
1 parent 5d7b57e commit a2c3664
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/plugins/firebase/users-workouts-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ export default class UsersWorkoutsDB extends GenericDB {
}

if (lastVisible) {
const data = lastVisible.data() as { updateTimestamp: Timestamp }
if (data && data.updateTimestamp) {
combinedQuery.push(startAfter(data.updateTimestamp))
}
const { updateTimestamp } = lastVisible

Check failure on line 56 in src/plugins/firebase/users-workouts-db.ts

View workflow job for this annotation

GitHub Actions / tests

Property 'updateTimestamp' does not exist on type 'DocumentSnapshot<DocumentData, DocumentData>'.

Check failure on line 56 in src/plugins/firebase/users-workouts-db.ts

View workflow job for this annotation

GitHub Actions / tests

Property 'updateTimestamp' does not exist on type 'DocumentSnapshot<DocumentData, DocumentData>'.
combinedQuery.push(startAfter(updateTimestamp))
}

if (amount !== null) {
Expand Down

0 comments on commit a2c3664

Please sign in to comment.