mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
Fix: reassign object for user.items.eggs to trigger change in vue view
This commit is contained in:
@@ -44,7 +44,10 @@ export default function hatch (user, req = {}) {
|
||||
...user.items.pets,
|
||||
[pet]: 5,
|
||||
};
|
||||
user.items.eggs[egg] -= 1;
|
||||
user.items.eggs = {
|
||||
...user.items.eggs,
|
||||
[egg]: user.items.eggs - 1,
|
||||
};
|
||||
user.items.hatchingPotions[hatchingPotion] -= 1;
|
||||
if (user.markModified) {
|
||||
user.markModified('items.pets');
|
||||
|
||||
Reference in New Issue
Block a user