mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-21 21:28:52 +00:00
fix(spells): temp fix to #4067, for some reason _v is undefined after
casting spells?
This commit is contained in:
parent
577cfb8d31
commit
562f593c8f
1 changed files with 1 additions and 0 deletions
|
|
@ -404,6 +404,7 @@ UserSchema.pre('save', function(next) {
|
|||
this.achievements.beastMaster = petCount >= 90;
|
||||
|
||||
//our own version incrementer
|
||||
if (_.isNaN(this._v) || !_.isNumber(this._v)) this._v = 0;
|
||||
this._v++;
|
||||
|
||||
next();
|
||||
|
|
|
|||
Loading…
Reference in a new issue