Skip to content

Commit

Permalink
Drilldown MDX parsing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Jul 10, 2017
1 parent e93c8b5 commit b4940b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions source/js/MDXParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit b4940b0

Please sign in to comment.