mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
tmp hotfix, people still have null tasks? `Cannot read property 'tags'
of undefined`
This commit is contained in:
@@ -218,6 +218,7 @@ function transformTaskLists(doc) {
|
||||
_.each(['habit', 'daily', 'todo', 'reward'], function(type) {
|
||||
// we use _.transform instead of a simple _.where in order to maintain sort-order
|
||||
doc[type + "s"] = _.reduce(doc[type + "Ids"], function(m, tid) {
|
||||
if (!doc.tasks[tid]) return m; // FIXME tmp hotfix, people still have null tasks?
|
||||
if (!doc.tasks[tid].tags) doc.tasks[tid].tags = {}; // FIXME remove this when we switch tasks to subdocs and can define tags default in schema
|
||||
m.push(doc.tasks[tid]);
|
||||
return m;
|
||||
|
||||
Reference in New Issue
Block a user