mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix typo in if condition and write test
This commit is contained in:
@@ -171,7 +171,7 @@ schema.pre('save', true, function preSaveUser (next, done) {
|
||||
// since it'll break as soon as a new field is added to the schema but not here.
|
||||
|
||||
// do not calculate achievements if items or achievements are not selected
|
||||
if (!this.isSelected('items') || !this.isSelected('achievements')) {
|
||||
if (this.isSelected('items') && this.isSelected('achievements')) {
|
||||
// Determines if Beast Master should be awarded
|
||||
let beastMasterProgress = shared.count.beastMasterProgress(this.items.pets);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user