mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
Fix negative quest scroll number on bundle purchase (#13415)
This commit is contained in:
parent
28e133858a
commit
b3cfcab5fb
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ function purchaseItem (user, item, price, type, key) {
|
||||||
} else if (type === 'bundles') {
|
} else if (type === 'bundles') {
|
||||||
const subType = item.type;
|
const subType = item.type;
|
||||||
forEach(item.bundleKeys, bundledKey => {
|
forEach(item.bundleKeys, bundledKey => {
|
||||||
if (!user.items[subType][bundledKey] || user.items[subType][key] < 0) {
|
if (!user.items[subType][bundledKey] || user.items[subType][bundledKey] < 0) {
|
||||||
user.items[subType][bundledKey] = 0;
|
user.items[subType][bundledKey] = 0;
|
||||||
}
|
}
|
||||||
user.items[subType][bundledKey] += 1;
|
user.items[subType][bundledKey] += 1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue