From b4940b04c35b3b716eea2268f91817fb830c4856 Mon Sep 17 00:00:00 2001 From: ZitRos Date: Mon, 10 Jul 2017 14:24:11 +0300 Subject: [PATCH] Drilldown MDX parsing fix --- package.json | 2 +- source/js/MDXParser.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 85c7e68..58cf0d2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "LightPivotTable", "author": "ZitRo", - "version": "1.8.3", + "version": "1.8.4", "description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache", "main": "test/testServer.js", "repository": { diff --git a/source/js/MDXParser.js b/source/js/MDXParser.js index 7981f80..c4f6bc1 100644 --- a/source/js/MDXParser.js +++ b/source/js/MDXParser.js @@ -78,15 +78,15 @@ MDXParser.prototype.drillDown = function (mdx, filter, expression) { } var selectBody = parts[parts.length - 3], - dimensions = selectBody.split(/(\s*ON\s*[01]\s*,?\s*)/); + dimensions = selectBody.split(/(\s*ON\s*[01]\s*,?\s*)/i); if (dimensions.length < 2) { - this._warnMDX(mdx); + this._warnMDX(mdx, "DrillDown is impossible"); return ""; // no dimensions matched } var index = -1; - dimensions.map(function(e,i){if(e.match(/\s*ON\s*[01]\s*,?\s*/)) index=i-1; return e;}); + dimensions.map(function(e,i){if(e.match(/\s*ON\s*[01]\s*,?\s*/i)) index=i-1; return e;}); if (index === -1) { this._warnMDX(mdx, "DrillDown is impossible");