Fix bug on 0 lvl exp-chart

This commit is contained in:
Tyler Renelle 2012-07-06 17:21:36 -04:00
parent 2444676cc4
commit 9332d9c175
2 changed files with 3 additions and 4 deletions

View file

@ -119,7 +119,9 @@ ready (model) ->
# tally experience
expTally = user.get 'exp'
lvl = 0 #iterator
_(user.get('lvl')-1).times ->
lvl++
expTally += 50 * Math.pow(lvl, 2) - 150 * lvl + 200
model.push '_user.history.exp', { date: new Date(), value: expTally }

View file

@ -24,12 +24,9 @@
</td>
<td>
&nbsp;<div id="exp-chart" style="display:none;height:95px;width:300px;"></div>
</td>
</tr>
</table>
<div id="exp-chart" style="display:none;"></div>
<!--<% else %>
<h1>HabitRPG</h1>
<p>A habit tracker app which treats your goals like a Role Playing Game. <a href="https://github.com/lefnire/habitrpg#habitrpg">More Information</a></p>