Put in a fallback in case somehow the gems weren't loaded for the PlayHeroesView locked hero gem costs.

This commit is contained in:
Nick Winter 2014-12-04 13:57:21 -08:00
parent a25d306be7
commit dffc14f995

View file

@ -75,6 +75,10 @@
h2(data-i18n="choose_hero.available_for_purchase") Available for Purchase
button.btn.unlock-button#purchase-hero-button
span.spr(data-i18n="play.unlock") Unlock
- if(!visibleHero.get('gems')) {
- console.error('Huh, we loaded the hero with no gem cost.');
- visibleHero.set('gems', {ninja: 400, librarian: 400}[visibleHero.get('slug')] || 1000);
- }
span= visibleHero.get('gems')
span.gem.gem-20