This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit a578105133bed7b80e37f49693ad772cbce96e7d
Author: Kehua Wu <[email protected]>
AuthorDate: Wed Nov 13 17:58:45 2019 +0800

    KYLIN-4252 Fix the error "Cannot read property 'index' of null" in 
visualization page
---
 webapp/app/js/controllers/query.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/webapp/app/js/controllers/query.js 
b/webapp/app/js/controllers/query.js
index e2b8520..569bdc5 100644
--- a/webapp/app/js/controllers/query.js
+++ b/webapp/app/js/controllers/query.js
@@ -508,11 +508,11 @@ KylinApp
                 $scope.chart = undefined;
 
                 var selectedDimension = query.graph.state.dimensions;
-                if (selectedDimension && 
query.graph.type.dimension.types.indexOf(selectedDimension.type) > -1) {
+                var selectedMetric = query.graph.state.metrics;
+                if (selectedDimension && selectedMetric && 
query.graph.type.dimension.types.indexOf(selectedDimension.type) > -1) {
                     $scope.chart = {};
 
                     var chartType = query.graph.type.value;
-                    var selectedMetric = query.graph.state.metrics;
 
                     var dataValues = [];
                     angular.forEach(query.result.results, function(result, 
ind) {

Reply via email to