From 8d5c573b00bc55aa62e1678907f75813e5da1854 Mon Sep 17 00:00:00 2001 From: ZitRo Date: Sun, 18 Mar 2018 20:29:37 +0200 Subject: [PATCH] Fix no data to display not showing in some cases --- source/js/DataSource.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/js/DataSource.js b/source/js/DataSource.js index 0d30d08..34026ae 100644 --- a/source/js/DataSource.js +++ b/source/js/DataSource.js @@ -222,9 +222,11 @@ DataSource.prototype.getCurrentData = function (callback) { })(data)); } else if (mdxType === "mdx") { - if (!data || !data.Data || !data.Cols - || (!data.Data.length && !((data.Cols[0]||{}).tuples||[]).length) - && !((data.Cols[1]||{}).tuples||[]).length) { + if ( + !data || !data.Data || !data.Data.length || !data.Cols + || (!data.Data.length && !((data.Cols[0]||{}).tuples||[]).length) + && !((data.Cols[1]||{}).tuples||[]).length + ) { return callback({ error: pivotLocale.get(4) });