Skip to content

Aggregation transform throws when aggregations not defined #2024

Closed
@bpostlethwaite

Description

@bpostlethwaite

@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

Metadata

Metadata

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions