mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Correct code to not iterate over mongoose object
This commit is contained in:
@@ -580,7 +580,22 @@ function _populateDefaultsForNewUser(user) {
|
||||
if (user.registeredThrough === "habitica-web") {
|
||||
taskTypes = ['habits', 'dailys', 'todos', 'rewards', 'tags'];
|
||||
|
||||
_.each(user.flags.tutorial.common, function(value, section) {
|
||||
var tutorialCommonSections = [
|
||||
'habits',
|
||||
'dailies',
|
||||
'todos',
|
||||
'rewards',
|
||||
'party',
|
||||
'pets',
|
||||
'gems',
|
||||
'skills',
|
||||
'classes',
|
||||
'tavern',
|
||||
'equipment',
|
||||
'items',
|
||||
];
|
||||
|
||||
_.each(tutorialCommonSections, function(section) {
|
||||
user.flags.tutorial.common[section] = true;
|
||||
});
|
||||
} else {
|
||||
@@ -588,7 +603,23 @@ function _populateDefaultsForNewUser(user) {
|
||||
|
||||
user.flags.showTour = false;
|
||||
|
||||
_.each(user.flags.tour, function(value, section) {
|
||||
var tourSections = [
|
||||
'showTour',
|
||||
'intro',
|
||||
'classes',
|
||||
'stats',
|
||||
'tavern',
|
||||
'party',
|
||||
'guilds',
|
||||
'challenges',
|
||||
'market',
|
||||
'pets',
|
||||
'mounts',
|
||||
'hall',
|
||||
'equipment',
|
||||
];
|
||||
|
||||
_.each(tourSections, function(section) {
|
||||
user.flags.tour[section] = -2;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user