Closed madsbacha closed 1 month ago
Set a default value for user stats to prevent error in scenario where the user has no stats.
In some scenarios, the stats object on the user looks like this:
"stats": { "diffStats": { "total": 0, "easy": 0, "normal": 0, "hard": 0, "expert": 0, "expertPlus": 0 } },
To fix the issue, we want to set a default value for these parameters to prevent the mod from throwing the error ".stats.totalUpvotes not found error"
Fixes #20
Looks good to me. Thank you for your contribution!
Set a default value for user stats to prevent error in scenario where the user has no stats.
In some scenarios, the stats object on the user looks like this:
To fix the issue, we want to set a default value for these parameters to prevent the mod from throwing the error ".stats.totalUpvotes not found error"
Fixes #20