Skip to content

Aggregation transform throws when aggregations not defined #2024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bpostlethwaite opened this issue Sep 20, 2017 · 0 comments · Fixed by #2031
Closed

Aggregation transform throws when aggregations not defined #2024

bpostlethwaite opened this issue Sep 20, 2017 · 0 comments · Fixed by #2031
Assignees
Labels
bug something broken

Comments

@bpostlethwaite
Copy link
Member

bpostlethwaite commented Sep 20, 2017

@alexcjohnson

Aggregations are scooped out of incoming transform here:
https://github.com/plotly/plotly.js/blob/master/src/transforms/aggregate.js#L158

and we check the length here:
https://github.com/plotly/plotly.js/blob/master/src/transforms/aggregate.js#L159

But later we check if it is defined at all:
https://github.com/plotly/plotly.js/blob/master/src/transforms/aggregate.js#L166

Partial aggregation transforms are easily composed in a UI and sending a partially complete transform without aggregations defined results in:

Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined

on line https://github.com/plotly/plotly.js/blob/master/src/transforms/aggregate.js#L159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants