Protects against faults for empty arrays on dashboard

This commit is contained in:
Patrick McDonagh
2017-02-15 15:51:59 -06:00
parent 7dd1470bdf
commit 62c582ee17

View File

@@ -21,6 +21,7 @@
</tr>
</thead>
<tbody>
{% if tag_values.length > 0}
{% for t in tag_values %}
<tr>
<td><a href="/values/tag/{{t._id}}">{{t._id}}</a></td>
@@ -40,6 +41,7 @@
<td>{{t.total | round(3)}}</td> -->
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
@@ -47,9 +49,11 @@
</div>
<div class="col-xs-6">
<h2>Latest Card</h2>
{% if latest_card %}
<h3>{{latest_card.timestamp | datetime('long')}}</h1>
<div class="surfacecard card"></div>
<div class="downholecard card"></div>
{% endif %}
</div>
</div>
</div>