This is an automated email from the ASF dual-hosted git repository. nic pushed a commit to branch 3.0.x in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 14bad162d109cd1148bcccd064f8e0fc5cf24e39 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 e0a92ae..18f1e4e 100644 --- a/webapp/app/js/controllers/query.js +++ b/webapp/app/js/controllers/query.js @@ -507,11 +507,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) {
