File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/cubejs-client-core/src Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ export default class ResultSet<T extends Record<string, any> = any> {
365365 return axisValues . map ( formatValue ) . join ( delimiter ) ;
366366 }
367367
368- public static getNormalizedPivotConfig ( query : PivotQuery , pivotConfig ?: PivotConfig ) : PivotConfigFull {
368+ public static getNormalizedPivotConfig ( query ? : PivotQuery , pivotConfig ?: PivotConfig ) : PivotConfigFull {
369369 const defaultPivotConfig : PivotConfig = {
370370 x : [ ] ,
371371 y : [ ] ,
@@ -376,9 +376,9 @@ export default class ResultSet<T extends Record<string, any> = any> {
376376 const {
377377 measures = [ ] ,
378378 dimensions = [ ]
379- } = query ;
379+ } = query || { } ;
380380
381- const timeDimensions = ( query . timeDimensions || [ ] ) . filter ( td => ! ! td . granularity ) ;
381+ const timeDimensions = ( query ? .timeDimensions || [ ] ) . filter ( td => ! ! td . granularity ) ;
382382
383383 pivotConfig = pivotConfig || ( timeDimensions . length ? {
384384 x : timeDimensions . map ( td => ResultSet . timeDimensionMember ( td ) ) ,
@@ -396,7 +396,7 @@ export default class ResultSet<T extends Record<string, any> = any> {
396396 timeDimensions . find ( td => td . dimension === subDim ) &&
397397 ! dimensions . find ( d => d === subDim )
398398 ) ?
399- ResultSet . timeDimensionMember ( ( query . timeDimensions || [ ] ) . find ( td => td . dimension === subDim ) ! ) :
399+ ResultSet . timeDimensionMember ( ( query ? .timeDimensions || [ ] ) . find ( td => td . dimension === subDim ) ! ) :
400400 subDim
401401 )
402402 ) ;
You can’t perform that action at this time.
0 commit comments