From 50ffe4dcdaa871ec6d3c59fd2306de1d8d66cfa4 Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 24 Dec 2013 16:22:24 -0600 Subject: [PATCH] Attempt to fix bug that turned all tasks into Dailies --- dist/habitrpg-shared.js | 4 +++- script/index.coffee | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 7fc1b4034c..5c81cf6706 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -11190,7 +11190,9 @@ var process=require("__browserify_process");(function() { } user.balance -= 2; _.each(user.tasks, function(task) { - task.value = 0; + return task.value = 0; + }); + _.each(user.tasks, function(task) { if (task.type = 'daily') { return task.streak = 0; } diff --git a/script/index.coffee b/script/index.coffee index 3da04c624d..2dd7b17632 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -408,6 +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 # Reset all dynamic stats