Skip to content

Commit 4b48c7f

Browse files
committed
fix(client-core): can't read property 'title' of undefined
1 parent 511004e commit 4b48c7f

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

packages/cubejs-client-core/dist/cubejs-client-core.esm.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,15 @@ function () {
160160
pivotConfig.y = pivotConfig.y.concat(['measures']);
161161
}
162162

163+
if (!(query.measures || []).length) {
164+
pivotConfig.x = pivotConfig.x.filter(function (d) {
165+
return d !== 'measures';
166+
});
167+
pivotConfig.y = pivotConfig.y.filter(function (d) {
168+
return d !== 'measures';
169+
});
170+
}
171+
163172
if (pivotConfig.fillMissingDates == null) {
164173
pivotConfig.fillMissingDates = true;
165174
}

packages/cubejs-client-core/dist/cubejs-client-core.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ function () {
164164
pivotConfig.y = pivotConfig.y.concat(['measures']);
165165
}
166166

167+
if (!(query.measures || []).length) {
168+
pivotConfig.x = pivotConfig.x.filter(function (d) {
169+
return d !== 'measures';
170+
});
171+
pivotConfig.y = pivotConfig.y.filter(function (d) {
172+
return d !== 'measures';
173+
});
174+
}
175+
167176
if (pivotConfig.fillMissingDates == null) {
168177
pivotConfig.fillMissingDates = true;
169178
}

packages/cubejs-client-core/dist/cubejs-client-core.umd.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14490,6 +14490,15 @@
1449014490
pivotConfig.y = pivotConfig.y.concat(['measures']);
1449114491
}
1449214492

14493+
if (!(query.measures || []).length) {
14494+
pivotConfig.x = pivotConfig.x.filter(function (d) {
14495+
return d !== 'measures';
14496+
});
14497+
pivotConfig.y = pivotConfig.y.filter(function (d) {
14498+
return d !== 'measures';
14499+
});
14500+
}
14501+
1449314502
if (pivotConfig.fillMissingDates == null) {
1449414503
pivotConfig.fillMissingDates = true;
1449514504
}

packages/cubejs-client-core/src/ResultSet.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export default class ResultSet {
7474
if (!pivotConfig.x.concat(pivotConfig.y).find(d => d === 'measures')) {
7575
pivotConfig.y = pivotConfig.y.concat(['measures']);
7676
}
77+
if (!(query.measures || []).length) {
78+
pivotConfig.x = pivotConfig.x.filter(d => d !== 'measures');
79+
pivotConfig.y = pivotConfig.y.filter(d => d !== 'measures');
80+
}
7781
if (pivotConfig.fillMissingDates == null) {
7882
pivotConfig.fillMissingDates = true;
7983
}

0 commit comments

Comments
 (0)