Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, if the Keen API responded with a result having a null entry,
parsing the response would result in a javascript error when this
project checks to see if the result needs to be cast to a Number.
This checks a few possible places were the API might return null, and does
not attempt to cast in these cases. This means null gets passed to the
chart, but in practice this hasn't been an issue. If it is, it could be
handled at the server level or the charting level, but at least this
project won't crash on it.
Note that only line 123 of current master is failing for me, but this commit changes three places total. The area surrounding line 123, and two other areas that look very similar in roughly the same part of the codebase. These other areas are total guesses, but since clearly this code doesn't expect the API to return null, maybe it's worth doing. 🤷♂️I did not try to get every possible place where something is returned from the API here.
Here's a couple screenshots to show what the data looks like to me when this happens. Only one null, right at the end: