mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
WIP(shops): fixes and Hall of Heroes update
This commit is contained in:
@@ -383,7 +383,7 @@ api.updateHero = {
|
||||
hero.items.pets['Dragon-Hydra'] = 5;
|
||||
hero.markModified('items.pets');
|
||||
}
|
||||
if (updateData.itemPath && updateData.itemVal && validateItemPath(updateData.itemPath)) {
|
||||
if (updateData.itemPath && (updateData.itemVal || updateData.itemVal === '') && validateItemPath(updateData.itemPath)) {
|
||||
// Sanitization at 5c30944 (deemed unnecessary)
|
||||
_.set(hero, updateData.itemPath, castItemVal(updateData.itemPath, updateData.itemVal));
|
||||
hero.markModified('items');
|
||||
|
||||
Reference in New Issue
Block a user