mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +00:00
Fix bug on 0 lvl exp-chart
This commit is contained in:
parent
2444676cc4
commit
9332d9c175
2 changed files with 3 additions and 4 deletions
|
|
@ -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 }
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,9 @@
|
|||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue