mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #3145
This commit is contained in:
parent
e0c99fa80c
commit
af503597e6
6
public/v1/js/ff/charts.js
vendored
6
public/v1/js/ff/charts.js
vendored
@ -376,13 +376,17 @@ function drawAChart(URI, container, chartType, options, colorData) {
|
|||||||
containerObj.removeClass('general-chart-error');
|
containerObj.removeClass('general-chart-error');
|
||||||
|
|
||||||
// if result is empty array, or the labels array is empty, show 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 (
|
if (
|
||||||
// is undefined
|
// is undefined
|
||||||
typeof data === 'undefined' ||
|
typeof data === 'undefined' ||
|
||||||
// is empty
|
// is empty
|
||||||
0 === data.length ||
|
0 === data.length ||
|
||||||
// isn't empty but contains no labels
|
// 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
|
// remove the chart container + parent
|
||||||
var holder = $('#' + container).parent().parent();
|
var holder = $('#' + container).parent().parent();
|
||||||
|
Loading…
Reference in New Issue
Block a user