keen / keen-dataviz.js

Data Visualization Charting Library
MIT License
224 stars 48 forks source link

Check if c3 artifact exists before load #221

Closed SebouChu closed 4 years ago

SebouChu commented 4 years ago

What does this PR do? How does it affect users?

When a chart is hidden at first, there's a callback which loads the dataset matrix in it. This PR adds a condition to check if datavizInstance.view._artifacts.c3 exists before calling the load function on it.

Related tickets?

I didn't create a ticket for this, but I had a problem with using this library and Keen Analysis.

Loading the results from a Keen Analysis query in a closed tab and then accessing it showed an error in the inspector : Uncaught TypeError: Cannot read property 'load' of undefined.

How should this be tested?

Load a page containing a chart with results loaded from a Keen Analysis query in a closed tab, then access it to see the chart.

Fetch the branch and/or deploy to staging to test the following:

apryka commented 4 years ago

the fix has been released in v3.14.2

@SebouChu thanks for finding!

SebouChu commented 4 years ago

@apryka Thanks for merging & releasing that fast! Have a good day!