Skip to content

Commit

Permalink
Do not trigger updateBatteryTracking() if the user has no Garmin or W…
Browse files Browse the repository at this point in the history
…ahoo profile linked.
  • Loading branch information
igoramadas committed Sep 25, 2024
1 parent d5f509b commit 4910803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gearwear/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ export class GearWear {
count += gearActivities.length
}

// If user is PRO, also track battery levels.
if (user.isPro && !user.preferences.privacyMode) {
// If user is PRO and has a Garmin or Wahoo profile linked, track battery levels.
if (user.isPro && !user.preferences.privacyMode && (user.garmin?.id || user.wahoo?.id)) {
await this.updateBatteryTracking(user, activities)
}
} catch (ex) {
Expand Down

0 comments on commit 4910803

Please sign in to comment.