forked from MarseyWorld/MarseyWorld
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 environmentmaster
parent
d53c714bb7
commit
02dde2a96f
|
@ -32,7 +32,7 @@ class Leaderboard:
|
||||||
self.all_users = lb[0]
|
self.all_users = lb[0]
|
||||||
self.v_position = lb[1]
|
self.v_position = lb[1]
|
||||||
self.v_value = lb[2]
|
self.v_value = lb[2]
|
||||||
if not self.v_value:
|
if self.v_value is None:
|
||||||
if value_func:
|
if value_func:
|
||||||
self.value_func = value_func
|
self.value_func = value_func
|
||||||
self.v_value = value_func(v)
|
self.v_value = value_func(v)
|
||||||
|
|
Loading…
Reference in New Issue