From 20f4a49c0bbfa7bcb012b97f3f90e92173632ecb Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Mon, 23 May 2016 20:02:57 +0200 Subject: [PATCH] fix missing 4th parameter to setWith --- common/script/ops/unlock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/script/ops/unlock.js b/common/script/ops/unlock.js index 5a53965443..62f1420e2a 100644 --- a/common/script/ops/unlock.js +++ b/common/script/ops/unlock.js @@ -62,7 +62,7 @@ module.exports = function unlock (user, req = {}, analytics) { _.each(setPaths, function markItemsAsPurchased (pathPart) { if (path.indexOf('gear.') !== -1) { // 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}} @@ -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}} - setWith(user, `preferences.${key}`, value); + setWith(user, `preferences.${key}`, value, Object); } else { // Using Object so path[1] won't create an array but an object {path: {1: value}} setWith(user, `purchased.${path}`, true, Object);