fix(task): hotfix for when task.attribute is sent as null

This commit is contained in:
Matteo Pagliazzi
2020-02-27 14:25:26 +01:00
parent 5db606dcfd
commit 3650426edc

View File

@@ -162,6 +162,12 @@ TaskSchema.plugin(baseModel, {
} }
} }
// Fix issue where iOS was sending null as the value of the attribute field
// See https://github.com/HabitRPG/habitica-ios/commit/4cd05f80363502eb7652e057aa564c85546f7806
if (taskObj.attribute === null) {
taskObj.attribute = 'str';
}
return taskObj; return taskObj;
}, },
private: [], private: [],