Mitigate undefined errors in PValueColumn #1025
Merged
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.
Features and Changes
When building the
ResultsTable
we may pass some default stats if a row is missing for a variation for some reason. We do:Because we don't populate
expected
orpValue
, if this code were to execute for some edge case, then the PValueColumn code which expectsdefined
values for those fields will throw an error.This PR fixes that by letting them be undefined and setting them to some default values if needed. The values themselves shouldn't matter since users should be 0 and therefore there should not be enough data to generate anything other than an empty
<td>
.I think this is causing a customer reported error and I think that this patch will at least fix the immediate issue.
We may prefer to figure out why this edge case is being created at all and more directly solve the issue, but this may be sufficient to prevent the front-end from throwing errors that lock the user out of the experiment page altogether.