From fe22edeccef4ba8b4b0c78448bbfc292a947a35e Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 20 Jan 2013 18:01:35 +0100 Subject: If no roles data is available, don't try to create chart. --- web/viewsjs/relation.js.erb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/viewsjs') diff --git a/web/viewsjs/relation.js.erb b/web/viewsjs/relation.js.erb index c2e003b..4e9544a 100644 --- a/web/viewsjs/relation.js.erb +++ b/web/viewsjs/relation.js.erb @@ -87,6 +87,10 @@ var create_flexigrid_for = { // Marimekko chart based on http://bl.ocks.org/1005090 function create_role_chart(data) { + if (data.length == 0) { + return; + } + var width = 800, height = 360, margin = 20; -- cgit v1.2.3