mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00: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:
parent
6a9025200c
commit
966bcf8010
1 changed files with 4 additions and 1 deletions
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue