diff --git a/src/app/index.coffee b/src/app/index.coffee index bde4b038d7..ea0d31781a 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -129,7 +129,10 @@ ready (model) -> # habitrpg-shared/algos requires uObj.habits, uObj.dailys etc instead of uObj.tasks _.each ['habit','daily','todo','reward'], (type) -> uObj["#{type}s"] = _.where(uObj.tasks, {type}); true algos.cron uObj, {paths} + # for new user, just set lastCron - no need to reset dom. + # remember that the properties are set from uObj & paths AFTER the return of this callback return if _.isEmpty(paths) or (paths['lastCron'] and _.size(paths) is 1) + # for everyone else, we need to reset dom - too many changes have been made and won't it breaks dom listeners. if lostHp = delete paths['stats.hp'] # we'll set this manually so we can get a cool animation setTimeout -> browser.resetDom(model)