WIP: Improve User model performances (#10832)
* wip: define items as mixed objects * add default owned gear * mark modified * more mark modified * more mark modified * more mark modified * more mark modified * fix common tests * fix common tests * update mongoose * add itemsUtils * use new util function in hall controller * add tests for items utils * update website/server to mark all items as modified * start updating common code * update login incentives * update unlock * remove changes to package-lock.json * remove changes to package.json
This commit is contained in:
@@ -4,7 +4,7 @@ import reduce from 'lodash/reduce';
|
||||
import includes from 'lodash/includes';
|
||||
|
||||
module.exports = function ultimateGear (user) {
|
||||
let owned = typeof window !== 'undefined' ? user.items.gear.owned : user.items.gear.owned.toObject();
|
||||
let owned = user.items.gear.owned.toObject ? user.items.gear.owned.toObject() : user.items.gear.owned;
|
||||
|
||||
content.classes.forEach((klass) => {
|
||||
if (user.achievements.ultimateGearSets[klass] !== true) {
|
||||
|
||||
Reference in New Issue
Block a user