diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-11-21 13:22:12 +0100 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-11-21 13:22:12 +0100 |
commit | 62ff128fc888518288096a0d868c61f37cf9962b (patch) | |
tree | 7ec0f56df251cdf225bf936556ebae68026f9179 | |
parent | 4c52d59cc3cfb1ff2dbad1e835a7ab392ddb487a (diff) | |
download | hyperkitty-62ff128fc888518288096a0d868c61f37cf9962b.tar.gz hyperkitty-62ff128fc888518288096a0d868c61f37cf9962b.tar.xz hyperkitty-62ff128fc888518288096a0d868c61f37cf9962b.zip |
More robustness
-rw-r--r-- | hyperkitty/static/hyperkitty/js/hyperkitty-common.js | 2 | ||||
-rw-r--r-- | hyperkitty/templates/index.html | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/hyperkitty/static/hyperkitty/js/hyperkitty-common.js b/hyperkitty/static/hyperkitty/js/hyperkitty-common.js index ac164ea..464cff5 100644 --- a/hyperkitty/static/hyperkitty/js/hyperkitty-common.js +++ b/hyperkitty/static/hyperkitty/js/hyperkitty-common.js @@ -130,6 +130,8 @@ function chart(elem_id, data, default_props) { default_props = {}; } + if (!data) { return; } + var props = {width: 250, height: 50}; $.extend(props, default_props); var margin = {top: 0, right: 0, bottom: 0, left: 0}, diff --git a/hyperkitty/templates/index.html b/hyperkitty/templates/index.html index 7e39a58..475d8be 100644 --- a/hyperkitty/templates/index.html +++ b/hyperkitty/templates/index.html @@ -107,14 +107,14 @@ <ul class="list-stats"> <li><span class="participant"> {% if mlist.can_view %} - {{ mlist.recent_participants_count }} + {{ mlist.recent_participants_count|default_if_none:"..." }} {% else %} ... {% endif %} participants</span></li> <li><span class="discussion"> {% if mlist.can_view %} - {{ mlist.recent_threads_count }} + {{ mlist.recent_threads_count|default_if_none:"..." }} {% else %} ... {% endif %} |