Skip to content

Commit b4940b0

Browse files
Drilldown MDX parsing fix
1 parent e93c8b5 commit b4940b0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "LightPivotTable",
33
"author": "ZitRo",
4-
"version": "1.8.3",
4+
"version": "1.8.4",
55
"description": "A lightweight pivot table for MDX2JSON source for InterSystems Cache",
66
"main": "test/testServer.js",
77
"repository": {

source/js/MDXParser.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ MDXParser.prototype.drillDown = function (mdx, filter, expression) {
7878
}
7979

8080
var selectBody = parts[parts.length - 3],
81-
dimensions = selectBody.split(/(\s*ON\s*[01]\s*,?\s*)/);
81+
dimensions = selectBody.split(/(\s*ON\s*[01]\s*,?\s*)/i);
8282

8383
if (dimensions.length < 2) {
84-
this._warnMDX(mdx);
84+
this._warnMDX(mdx, "DrillDown is impossible");
8585
return ""; // no dimensions matched
8686
}
8787

8888
var index = -1;
89-
dimensions.map(function(e,i){if(e.match(/\s*ON\s*[01]\s*,?\s*/)) index=i-1; return e;});
89+
dimensions.map(function(e,i){if(e.match(/\s*ON\s*[01]\s*,?\s*/i)) index=i-1; return e;});
9090

9191
if (index === -1) {
9292
this._warnMDX(mdx, "DrillDown is impossible");

0 commit comments

Comments
 (0)