fix: module crash when there are no clients (#8)

* fix: module crashing with no clients

* chore: version bump

* chore: format
This commit is contained in:
bryce
2025-09-14 14:16:26 -07:00
committed by GitHub
parent 0e8d7ffa32
commit 2f9fa1cb0b
6 changed files with 2178 additions and 10 deletions

View File

@@ -167,7 +167,7 @@ export class TogglTrack extends InstanceBase<ModuleConfig> {
timerDuration: timecodeSince(new Date(entry.start)),
timerProject: project?.label,
timerProjectID: entry.project_id,
timerClient: this.clients!.find((c) => c.id == project?.clientID)?.label,
timerClient: this.clients?.find((c) => c.id == project?.clientID)?.label ?? 'None',
timerClientID: project?.clientID,
})