Merge pull request #11637 from Xaz16/trigger-vue-reactivity-for-user

Trigger vue reactivity for user
This commit is contained in:
Matteo Pagliazzi
2020-01-14 13:00:07 +01:00
committed by GitHub
17 changed files with 610 additions and 155 deletions

View File

@@ -95,7 +95,10 @@ export function removePinnedGearAddPossibleNewOnes (user, itemPath, newItemKey)
// remove the old pinned gear items and add the new gear back
removePinnedGearByClass(user);
user.items.gear.owned[newItemKey] = true;
user.items.gear.owned = {
...user.items.gear.owned,
[newItemKey]: true,
};
if (user.markModified) user.markModified('items.gear.owned');
addPinnedGearByClass(user);