mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-19 20:34:44 +00:00
use _.isFunction
This commit is contained in:
parent
56437d499e
commit
bca346e616
1 changed files with 1 additions and 1 deletions
|
|
@ -269,7 +269,7 @@ UserSchema.pre('save', function(next) {
|
|||
|
||||
var petCount = helpers.countPets(_.reduce(this.items.pets,function(m,v){
|
||||
//HOTFIX - Remove when solution is found, the first argument passed to reduce is a function
|
||||
if(typeof(v) == 'function') return m;
|
||||
if(_.isFunction(v)) return m;
|
||||
return m+(v?1:0)},0), this.items.pets);
|
||||
this.achievements.beastMaster = petCount >= 90;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue