From 62ff128fc888518288096a0d868c61f37cf9962b Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Thu, 21 Nov 2013 13:22:12 +0100 Subject: More robustness --- hyperkitty/static/hyperkitty/js/hyperkitty-common.js | 2 ++ hyperkitty/templates/index.html | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'hyperkitty') 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 @@