Skip to content

Commit

Permalink
fix(schema-compiler): TypeError: Cannot read property 'filterToWhere'…
Browse files Browse the repository at this point in the history
… of undefined
  • Loading branch information
paveltiunov committed May 29, 2019
1 parent 98bad57 commit 6b399ea
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/cubejs-schema-compiler/adapter/PreAggregations.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,13 @@ class PreAggregations {
);
const filters =
segmentFilters
.concat(this.query.filters).concat(this.query.timeDimensions.map(dimension =>
dimension.dateRange && ({
filterToWhere: () => this.query.timeRangeFilter(
this.query.dimensionSql(dimension),
this.query.timeStampInClientTz(dimension.dateFromParam()),
this.query.timeStampInClientTz(dimension.dateToParam())
)
})
));
.concat(this.query.filters).concat(this.query.timeDimensions.map(dimension => dimension.dateRange && ({
filterToWhere: () => this.query.timeRangeFilter(
this.query.dimensionSql(dimension),
this.query.timeStampInClientTz(dimension.dateFromParam()),
this.query.timeStampInClientTz(dimension.dateToParam())
)
}))).filter(f => !!f);

const renderedReference = R.pipe(
R.map(path => {
Expand Down

0 comments on commit 6b399ea

Please sign in to comment.