mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
Fix: reassign object for user.items.hatchingPotions to trigger change in vue view
This commit is contained in:
@@ -48,7 +48,11 @@ export default function hatch (user, req = {}) {
|
||||
...user.items.eggs,
|
||||
[egg]: Number.isInteger(user.items.eggs) ? user.items.eggs - 1 : 0,
|
||||
};
|
||||
user.items.hatchingPotions[hatchingPotion] -= 1;
|
||||
user.items.hatchingPotions = {
|
||||
...user.items.hatchingPotions,
|
||||
[hatchingPotion]:
|
||||
Number.isInteger(user.items.hatchingPotion) ? user.items.hatchingPotion - 1 : 0,
|
||||
};
|
||||
if (user.markModified) {
|
||||
user.markModified('items.pets');
|
||||
user.markModified('items.eggs');
|
||||
|
||||
Reference in New Issue
Block a user