mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed issue with HeroVictoryModal assuming achievements all have rewards.
This commit is contained in:
parent
b85d541304
commit
039dd4f264
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ module.exports = class HeroVictoryModal extends ModalView
|
|||
thangTypeOriginals = []
|
||||
achievementIDs = []
|
||||
for achievement in @achievements.models
|
||||
rewards = achievement.get('rewards')
|
||||
rewards = achievement.get('rewards') or {}
|
||||
thangTypeOriginals.push rewards.heroes or []
|
||||
thangTypeOriginals.push rewards.items or []
|
||||
achievement.completed = LocalMongo.matchesQuery(@session.attributes, achievement.get('query'))
|
||||
|
@ -95,7 +95,7 @@ module.exports = class HeroVictoryModal extends ModalView
|
|||
# achievement.completed = true
|
||||
# achievement.completedAWhileAgo = false
|
||||
# achievement.attributes.worth = (index + 1) * achievement.get('worth', true)
|
||||
# rewards = achievement.get('rewards')
|
||||
# rewards = achievement.get('rewards') or {}
|
||||
# rewards.gems *= (index + 1)
|
||||
|
||||
c.thangTypes = @thangTypes
|
||||
|
|
Loading…
Reference in a new issue