diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 5c81cf6706..f81e5d0779 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11192,11 +11192,13 @@ var process=require("__browserify_process");(function() { _.each(user.tasks, function(task) { return task.value = 0; }); - _.each(user.tasks, function(task) { - if (task.type = 'daily') { - return task.streak = 0; + _ref = user.tasks; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + task = _ref[_i]; + if (task.type === 'daily') { + task.streak = 0; } - }); + } stats = user.stats; stats.buffs = {}; stats.hp = 50; diff --git a/script/index.coffee b/script/index.coffee index 2dd7b17632..0baed65149 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -408,9 +408,7 @@ api.wrap = (user) -> # Turn tasks yellow, zero out streaks _.each user.tasks, (task) -> task.value = 0 - _.each user.tasks, (task) -> - if task.type = 'daily' - task.streak = 0 + task.streak = 0 for task in user.tasks when task.type is 'daily' # Reset all dynamic stats stats = user.stats stats.buffs = {}