leaderboard: check for None explicitly instead of implicitly

nonetype is used in only one case, if the value is implicitly falsey (like a 0) it can *potentially* cause issues
i have no idea how to repro this, apparently @Aevann1 was able to and it's a issue on rdrama.net, but not devrama or my own testing environment
master
justcool393 2022-11-01 01:28:18 -05:00
parent d53c714bb7
commit 02dde2a96f
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class Leaderboard:
self.all_users = lb[0]
self.v_position = lb[1]
self.v_value = lb[2]
if not self.v_value:
if self.v_value is None:
if value_func:
self.value_func = value_func
self.v_value = value_func(v)