Skip to content

Commit

Permalink
fix: daysToShow is converted to a number if the user passes it as a s…
Browse files Browse the repository at this point in the history
…tring
  • Loading branch information
zoreet committed Jan 23, 2024
1 parent 735501e commit a8045a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/HabitTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default class HabitTracker {
DEFAULT_SETTINGS(),
this.removePrivateSettings(JSON.parse(rawSettings)),
)
settings.daysToShow = parseInt(settings.daysToShow)
/* i want to show that a streak is already ongoing even if the previous dates are not rendered
so I load an extra date in the range, but never display it in the UI */
settings.daysToLoad = settings.daysToShow + 1
Expand Down

0 comments on commit a8045a7

Please sign in to comment.