From af503597e62108cd7fedaa8ef89c80d161cbf304 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 23 Feb 2020 14:01:08 +0100 Subject: [PATCH] Fix #3145 --- public/v1/js/ff/charts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/v1/js/ff/charts.js b/public/v1/js/ff/charts.js index e704c87bca..2c9e23ac30 100644 --- a/public/v1/js/ff/charts.js +++ b/public/v1/js/ff/charts.js @@ -376,13 +376,17 @@ function drawAChart(URI, container, chartType, options, colorData) { containerObj.removeClass('general-chart-error'); // if result is empty array, or the labels array is empty, show error. + // console.log(URI); + // console.log(data.length); + // console.log(typeof data.labels); + // console.log(data.labels.length); if ( // is undefined typeof data === 'undefined' || // is empty 0 === data.length || // isn't empty but contains no labels - (data.length > 0 && typeof data.labels !== 'undefined' && 0 === data.labels.length) + (typeof data === 'object' && typeof data.labels === 'object' && 0 === data.labels.length) ) { // remove the chart container + parent var holder = $('#' + container).parent().parent();