From 786845effd3c8516b9cfd19be73d4fe6a258d7ac Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Sat, 28 Nov 2015 14:07:33 +0100 Subject: [PATCH] fix tour/tutorial on signup --- website/src/models/user.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/src/models/user.js b/website/src/models/user.js index 8c45fb1b2b..69125a86b2 100644 --- a/website/src/models/user.js +++ b/website/src/models/user.js @@ -544,15 +544,14 @@ function _populateDefaultsForNewUser (user) { if (user.registeredThrough === 'habitica-web') { taskTypes = ['habits', 'dailys', 'todos', 'rewards', 'tags']; - _.each(iterableFlags.tutorial.common, (section) => { + _.each(iterableFlags.tutorial.common, (val, section) => { user.flags.tutorial.common[section] = true; }); } else { taskTypes = ['todos', 'tags']; - user.flags.showTour = false; - _.each(iterableFlags.tour, (section) => { + _.each(iterableFlags.tour, (val, section) => { user.flags.tour[section] = -2; }); }