You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Victory blows up when you include a string or number as a child of VictoryChart.
The usual case where we might have a string is when we render a child conditionally and the condition is falsey with a 0 or empty string.
The error message in the header of this issue is from Victory Native, but, as pointed out in this comment it happens in Victory DOM as well:
Describe the bug
Victory blows up when you include a string or number as a child of
VictoryChart
.The usual case where we might have a string is when we render a child conditionally and the condition is falsey with a 0 or empty string.
The error message in the header of this issue is from Victory Native, but, as pointed out in this comment it happens in Victory DOM as well:
The line of code responsible for this:
victory/packages/victory-core/src/victory-util/helpers.ts
Line 257 in 2ec8d5d
It assumes the child always has
props
but that's not the case for strings or numbers.Victory version
[email protected]
To Reproduce
Try rendering this:
Expected behavior
In the process of collecting names, children as such should be ignored.
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: