Skip to content

Bug clicking in region map on empty regions #20407

@markov00

Description

@markov00

If you create a region map, add aggregations and than click on region that doesn't have data, Kibana will throw the following error:

Uncaught TypeError: Cannot read property '0' of undefined
    at Object.addFilter (vis.js:145)
    at ChoroplethLayer.<anonymous> (region_map_visualization.js:264)
    at ChoroplethLayer.EventEmitter.emit (events.js:81)
    at e.<anonymous> (choropleth_layer.js:139)
    at e.fire (leaflet.js:5)
    at e._fireDOMEvent (leaflet.js:6)
    at e._fireEvent (leaflet.js:8)
    at e._onClick (leaflet.js:8)
    at HTMLCanvasElement.h (leaflet.js:6)

The select/click event trigger the addFilter function with a rowIndex of -1 that will throws the error when the API.events.addFilter method try to find the correct row in the data table.

@elastic/kibana-visualizations

This bug is not yet released and would cause a regression from 6.3.0 if not fixed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions