diff --git a/package.json b/package.json index 58cf0d2..248b76a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "LightPivotTable", "author": "ZitRo", - "version": "1.8.4", + "version": "1.8.5", "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 c4f6bc1..fbe165c 100644 --- a/source/js/MDXParser.js +++ b/source/js/MDXParser.js @@ -112,7 +112,7 @@ MDXParser.prototype.drillDown = function (mdx, filter, expression) { */ MDXParser.prototype.drillThrough = function (basicMDX, filters) { - var cubeAndFilters = basicMDX.split(/(FROM\s*\[[^\]]*].*)/i)[1], + var cubeAndFilters = basicMDX.slice(basicMDX.lastIndexOf("FROM ")), query = "DRILLTHROUGH SELECT " + cubeAndFilters; for (var i in filters) {