mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix missing 4th parameter to setWith
This commit is contained in:
@@ -62,7 +62,7 @@ module.exports = function unlock (user, req = {}, analytics) {
|
|||||||
_.each(setPaths, function markItemsAsPurchased (pathPart) {
|
_.each(setPaths, function markItemsAsPurchased (pathPart) {
|
||||||
if (path.indexOf('gear.') !== -1) {
|
if (path.indexOf('gear.') !== -1) {
|
||||||
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
||||||
setWith(user, pathPart, true);
|
setWith(user, pathPart, true, Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
||||||
@@ -78,7 +78,7 @@ module.exports = function unlock (user, req = {}, analytics) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
||||||
setWith(user, `preferences.${key}`, value);
|
setWith(user, `preferences.${key}`, value, Object);
|
||||||
} else {
|
} else {
|
||||||
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
// Using Object so path[1] won't create an array but an object {path: {1: value}}
|
||||||
setWith(user, `purchased.${path}`, true, Object);
|
setWith(user, `purchased.${path}`, true, Object);
|
||||||
|
|||||||
Reference in New Issue
Block a user