mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Ensure first-time purchases are synced (#11915)
* Ensure first-time purchases are synced * whitespace commit to trigger tests * Undo whitespace commit * more whitespace * remove the whitespace
This commit is contained in:
@@ -64,7 +64,10 @@ function purchaseItem (user, item, price, type, key) {
|
||||
if (!user.items[type][key] || user.items[type][key] < 0) {
|
||||
user.items[type][key] = 0;
|
||||
}
|
||||
user.items[type][key] += 1;
|
||||
user.items[type] = {
|
||||
...user.items[type],
|
||||
[key]: user.items[type][key] + 1,
|
||||
};
|
||||
if (user.markModified) user.markModified(`items.${type}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user